home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / languages / obrn-a_1.5_lib.lha / oberon-a / source1.lha / source / amiga / Graphics.mod < prev    next >
Encoding:
Text File  |  1995-01-26  |  107.8 KB  |  3,264 lines

  1. (***************************************************************************
  2.  
  3.      $RCSfile: Graphics.mod $
  4.   Description: Interface to graphics.library
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.7 $
  8.       $Author: fjc $
  9.         $Date: 1995/01/26 02:39:55 $
  10.  
  11.   Includes Release 40.15
  12.  
  13.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  14.       All Rights Reserved
  15.  
  16.   Oberon-A interface Copyright © 1994-1995, Frank Copeland.
  17.   This file is part of the Oberon-A Interface.
  18.   See Oberon-A.doc for conditions of use and distribution.
  19.  
  20. ***************************************************************************)
  21.  
  22. <* STANDARD- *> <* INITIALISE- *> <* MAIN- *>
  23.  
  24. MODULE [2] Graphics;
  25.  
  26. <*$ CaseChk-  IndexChk- LongVars+ NilChk-  *>
  27. <*$ RangeChk- StackChk- TypeChk-  OvflChk- *>
  28.  
  29. IMPORT
  30.   SYS := SYSTEM, Kernel, e := Exec, h := Hardware, u := Utility,
  31.   s := Sets;
  32.  
  33. (**
  34. **      All pointers are declared forward here for convenience.
  35. *)
  36.  
  37. TYPE
  38.  
  39.   RectanglePtr *            = POINTER TO Rectangle;
  40.   Rect32Ptr *               = POINTER TO Rect32;
  41.   PointPtr *                = POINTER TO Point;
  42.   BitMapPtr *               = POINTER TO BitMap;
  43.   ExtendedNodePtr *         = POINTER TO ExtendedNode;
  44.   AnalogSignalIntervalPtr * = POINTER TO AnalogSignalInterval;
  45.   SpecialMonitorPtr *       = POINTER TO SpecialMonitor;
  46.   MonitorSpecPtr *          = POINTER TO MonitorSpec;
  47.   QueryHeaderPtr *          = POINTER TO QueryHeader;
  48.   DisplayInfoPtr *          = POINTER TO DisplayInfo;
  49.   DimensionInfoPtr *        = POINTER TO DimensionInfo;
  50.   MonitorInfoPtr *          = POINTER TO MonitorInfo;
  51.   NameInfoPtr *             = POINTER TO NameInfo;
  52.   VSpritePtr *              = POINTER TO VSprite;
  53.   BobPtr *                  = POINTER TO Bob;
  54.   AnimCompPtr *             = POINTER TO AnimComp;
  55.   DBufPacketPtr *           = POINTER TO DBufPacket;
  56.   AnimObPtr *               = POINTER TO AnimOb;
  57.   CollTablePtr *            = POINTER TO CollTable;
  58.   AreaInfoPtr *             = POINTER TO AreaInfo;
  59.   TmpRasPtr *               = POINTER TO TmpRas;
  60.   GelsInfoPtr *             = POINTER TO GelsInfo;
  61.   RastPortPtr *             = POINTER TO RastPort;
  62.   CopInsPtr *               = POINTER TO CopIns;
  63.   CopInsCLPtr *             = POINTER TO CopInsCL;
  64.   CprlistPtr *              = POINTER TO Cprlist;
  65.   CopListPtr *              = POINTER TO CopList;
  66.   CopList13Ptr *            = POINTER TO CopList13;
  67.   UCopListPtr *             = POINTER TO UCopList;
  68.   ViewPortPtr *             = POINTER TO ViewPort;
  69.   ViewPtr *                 = POINTER TO View;
  70.   ViewExtraPtr *            = POINTER TO ViewExtra;
  71.   ViewPortExtraPtr *        = POINTER TO ViewPortExtra;
  72.   RasInfoPtr *              = POINTER TO RasInfo;
  73.   ColorMapPtr *             = POINTER TO ColorMap;
  74.   LayerInfoPtr *            = POINTER TO LayerInfo;
  75.   LayerPtr *                = POINTER TO Layer;
  76.   ClipRectPtr *             = POINTER TO ClipRect;
  77.   RegionRectanglePtr *      = POINTER TO RegionRectangle;
  78.   RegionPtr *               = POINTER TO Region;
  79.   SimpleSpritePtr *         = POINTER TO SimpleSprite;
  80.   TextAttrPtr *             = POINTER TO TextAttr;
  81.   TTextAttrPtr *            = POINTER TO TTextAttr;
  82.   TextFontPtr *             = POINTER TO TextFont;
  83.   TextFontExtensionPtr *    = POINTER TO TextFontExtension;
  84.   ColorFontColorsPtr *      = POINTER TO ColorFontColors;
  85.   ColorTextFontPtr *        = POINTER TO ColorTextFont;
  86.   TextextentPtr *           = POINTER TO Textextent;
  87.   IsrvstrPtr *              = POINTER TO Isrvstr;
  88.   BitScaleArgsPtr *         = POINTER TO BitScaleArgs;
  89.   CopListDummyPtr *          = POINTER TO CopListDummy;
  90.   PaletteExtraPtr *         = POINTER TO PaletteExtra;
  91.   DBufInfoPtr *             = POINTER TO DBufInfo;
  92.   ExtSpritePtr *            = POINTER TO ExtSprite;
  93.  
  94.  
  95. (*
  96. **      $VER: gfx.h 39.5 (19.3.92)
  97. **
  98. **      general graphics library definitions
  99. *)
  100.  
  101. TYPE
  102.  
  103.   RectangleBase *= RECORD END;
  104.  
  105.   Rectangle * = RECORD (RectangleBase)
  106.     minX *, minY * : INTEGER;
  107.     maxX *, maxY * : INTEGER;
  108.   END; (* Rectangle *)
  109.  
  110.   Rect32 * = RECORD
  111.     minX *, minY * : LONGINT;
  112.     maxX *, maxY * : LONGINT;
  113.   END; (* Rect32 *)
  114.  
  115.   Point * = RECORD
  116.     x *, y * : INTEGER;
  117.   END; (* Point *)
  118.  
  119.   PLANEPTR * = e.APTR;
  120.  
  121.   BitMap * = RECORD
  122.     bytesPerRow * : e.UWORD;
  123.     rows *        : e.UWORD;
  124.     flags *       : s.SET8;
  125.     depth *       : SHORTINT;
  126.     pad *         : e.UWORD;
  127.     planes *      : ARRAY 8 OF PLANEPTR;
  128.   END; (* BitMap *)
  129.  
  130. CONST
  131.  
  132. (* flags for AllocBitMap, etc. *)
  133.   bmbClear       * = 0;
  134.   bmbDisplayable * = 1;
  135.   bmbInterleaved * = 2;
  136.   bmbStandard    * = 3;
  137.   bmbMinPlanes   * = 4;
  138.  
  139. (* the following are for GetBitMapAttr() *)
  140.   bmaHeight * = 0;
  141.   bmaDepth  * = 4;
  142.   bmaWidth  * = 8;
  143.   bmaFlags  * = 12;
  144.  
  145. (*
  146. **      $VER: gfxnodes.h 39.0 (21.8.91)
  147. **
  148. **      graphics extended node definintions
  149. *)
  150.  
  151. TYPE
  152.  
  153.   ExtendedNodeBase *= RECORD (e.NodeBase) END;
  154.   ExtendedNodeBasePtr *= POINTER TO ExtendedNodeBase;
  155.  
  156.   ExtendedNode * = RECORD (ExtendedNodeBase)
  157.     node *      : e.Node;
  158.     subsystem * : SHORTINT;
  159.     subtype *   : SHORTINT;
  160.     library *   : LONGINT;
  161.     init *      : e.PROC;
  162.   END; (* ExtendedNode *)
  163.  
  164. CONST
  165.  
  166.   ssGraphics *    = 02H;
  167.  
  168.   viewExtraType *        = 1;
  169.   viewPortExtraType *    = 2;
  170.   specialMonitorType *   = 3;
  171.   monitorSpecType *      = 4;
  172.  
  173.  
  174. (*
  175. **      $VER: monitor.h 39.7 (9.6.92)
  176. **
  177. **      graphics monitorspec definintions
  178. *)
  179.  
  180. TYPE
  181.  
  182.   MonitorSpec * = RECORD (ExtendedNodeBase)
  183.     node *                   : ExtendedNode;
  184.     flags *                  : s.SET16;
  185.     ratioh *                 : LONGINT;
  186.     ratiov *                 : LONGINT;
  187.     totalRows *              : e.UWORD;
  188.     totalColorClocks *       : e.UWORD;
  189.     deniseMaxDisplayColumn * : e.UWORD;
  190.     beamCon0 *               : e.UWORD;
  191.     minRow *                 : e.UWORD;
  192.     special *                : SpecialMonitorPtr;
  193.     openCount *              : e.UWORD;
  194.     transform *              : e.PROC;
  195.     translate *              : e.PROC;
  196.     scale *                  : e.PROC;
  197.     xoffset *                : e.UWORD;
  198.     yoffset *                : e.UWORD;
  199.     legalView *              : Rectangle;
  200.     maxoscan *               : e.PROC; (* maximum legal overscan *)
  201.     videoscan *              : e.PROC; (* video display overscan *)
  202.     deniseMinDisplayColumn * : e.UWORD;
  203.     displayCompatible *      : e.ULONG;
  204.     displayInfoDataBase *    : e.List;
  205.     displayInfoDataBaseSemaphore * : e.SignalSemaphore;
  206.     mrgCop *                 : e.PROC;
  207.     loadView *               : e.PROC;
  208.     killView *               : e.PROC;
  209.   END; (* MonitorSpec *)
  210.  
  211. CONST
  212.  
  213.   toMonitor *       = 0;
  214.   fromMonitor *     = 1;
  215.   standardXOffset * = 9;
  216.   standardYOffset * = 0;
  217.  
  218.   msbRequestNTSC    * = 0;
  219.   msbRequestPAL     * = 1;
  220.   msbRequestSpecial * = 2;
  221.   msbRequestA2024   * = 3;
  222.   msbDoubleSprites  * = 4;
  223.  
  224. (* obsolete, v37 compatible definitions follow *)
  225.   requestNTSC *     = 1;
  226.   requestPAL *      = 2;
  227.   requestSpecial *  = 4;
  228.   requestA2024 *    = 8;
  229.  
  230.   defaultMonitorName *    = "default.monitor";
  231.   ntscMonitorName *       = "ntsc.monitor";
  232.   palMonitorName *        = "pal.monitor";
  233.   standardMonitorMask *   = requestNTSC + requestPAL;
  234.  
  235.   standardNTSCRows *      = 262;
  236.   standardPALRows *       = 312;
  237.   standardColorClocks *   = 226;
  238.   standardDeniseMax *     = 455;
  239.   standardDeniseMin *     = 93;
  240.   standardNTSCBeamCon *   = {};
  241.   standardPALBeamCon *    = {h.displayPAL};
  242.  
  243.   specialBeamcon * =
  244.     { h.varVBlank, h.loLDis, h.varVSync,
  245.       h.varHSync, h.varBeam, h.csBlank, h.vSyncTrue };
  246.  
  247.   minNTSCRow *      = 21;
  248.   minPALRow *       = 29;
  249.   standardViewX *   = 81H;
  250.   standardViewY *   = 2CH;
  251.   standardHBstrt *  = 06H;
  252.   standardHSstrt *  = 0BH;
  253.   standardHSstop *  = 1CH;
  254.   standardHBstop *  = 2CH;
  255.   standardVBstrt *  = 0122H;
  256.   standardVSstrt *  = 02A6H;
  257.   standardVSstop *  = 03AAH;
  258.   standardVBstop *  = 1066H;
  259.  
  260.   vgaColorClocks *  = standardColorClocks DIV 2;
  261.   vgaTotalRows *    = standardNTSCRows *  2;
  262.   vgaDeniseMin *    = 59;
  263.   minvgaRow *       = 29;
  264.   vgaHBstrt *       = 08H;
  265.   vgaHSstrt *       = 0EH;
  266.   vgaHSstop *       = 1CH;
  267.   vgaHBstop *       = 1EH;
  268.   vgaVBstrt *       = 0000H;
  269.   vgaVSstrt *       = 0153H;
  270.   vgaVSstop *       = 0235H;
  271.   vgaVBstop *       = 0CCDH;
  272.  
  273.   vgaMonitorName *    = "vga.monitor";
  274.  
  275. (* NOTE: VGA70 definitions are obsolete - a VGA70 monitor has never been
  276.  * implemented.
  277.  *)
  278.   vga70ColorClocks *  = standardColorClocks DIV 2;
  279.   vga70TotalRows *    = 449;
  280.   vga70DeniseMin *    = 59;
  281.   minvga70Row *       = 35;
  282.   vga70HBstrt *       = 08H;
  283.   vga70HSstrt *       = 0EH;
  284.   vga70HSstop *       = 1CH;
  285.   vga70HBstop *       = 1EH;
  286.   vga70VBstrt *       = 0000H;
  287.   vga70VSstrt *       = 02A6H;
  288.   vga70VSstop *       = 0388H;
  289.   vga70VBstop *       = 0F73H;
  290.  
  291.   vga70beamcon *      = specialBeamcon / { h.vSyncTrue };
  292.   vga70MonitorName *  = "vga70.monitor";
  293.  
  294.   broadcastHBstrt *        = 01H;
  295.   broadcastHSstrt *        = 06H;
  296.   broadcastHSstop *        = 17H;
  297.   broadcastHBstop *        = 27H;
  298.   broadcastVBstrt *        = 0000H;
  299.   broadcastVSstrt *        = 02A6H;
  300.   broadcastVSstop *        = 054CH;
  301.   broadcastVBstop *        = 1C40H;
  302.   broadcastBeamCon *       = { h.loLDis, h.csBlank };
  303.   ratioFixedPart *         = 4;
  304.   ratioUnity *             = (*ASH (1, ratioFixedPart)*) 16;
  305.  
  306. TYPE
  307.  
  308.   AnalogSignalInterval * = RECORD
  309.     start * : e.UWORD;
  310.     stop *  : e.UWORD;
  311.   END; (* AnalogSignalInterval *)
  312.  
  313.   SpecialMonitor * = RECORD (ExtendedNodeBase)
  314.     node *      : ExtendedNode;
  315.     flags *     : s.SET16;
  316.     doMonitor * : e.PROC;
  317.     reserved1 * : e.PROC;
  318.     reserved2 * : e.PROC;
  319.     reserved3 * : e.PROC;
  320.     hblank *    : AnalogSignalInterval;
  321.     vblank *    : AnalogSignalInterval;
  322.     hsync *     : AnalogSignalInterval;
  323.     vsync *     : AnalogSignalInterval;
  324.   END; (* SpecialMonitor *)
  325.  
  326.  
  327. (*
  328. **      $VER: display.h 39.0 (21.8.91)
  329. **
  330. **      definitions for display control registers
  331. *)
  332.  
  333.  
  334. CONST
  335.  
  336. (* bplcon0 defines *)
  337.   mode640 *      = 15;
  338.   plnCntMsk *    = {0..2};     (* how many bit planes? *)
  339.                                (* 0 = none, 1->6 = 1->6, 7 = reserved *)
  340.   plnCntShft *   = 12;         (* bits to shift for bplcon0 *)
  341.   pf2pri *       = 6;          (* bplcon2 bit *)
  342.   colorOn *      = 9;          (* disable color burst *)
  343.   dblpf *        = 10;
  344.   holdnmodify *  = 11;
  345.   interlace *    = 2;          (* interlace mode for 400 *)
  346.  
  347. (* bplcon1 defines *)
  348.   fineScroll *      = {0..3};
  349.   fineScrollShift * = 4;
  350.   fineScrollMask *  = {0..3};
  351.  
  352. (* display window start and stop defines *)
  353.   horizPos *      = {0..6};      (* horizontal start/stop *)
  354.   vrtclPos *      = {0..8};      (* vertical start/stop *)
  355.   vrtclPosShift * = 7;
  356.  
  357. (* Data fetch start/stop horizontal position *)
  358.   dftchMask *       = {0..7};
  359.  
  360. (* vposr bits *)
  361.   vposrlof *        = {15};
  362.  
  363.  
  364.  
  365. (*
  366. **      $VER: displayinfo.h 39.13 (31.5.93)
  367. **
  368. **      definitions for displayinfo database
  369. *)
  370.  
  371.  
  372. TYPE
  373.  
  374. (* the "public" handle to a DisplayInfoRecord *)
  375.  
  376.   DisplayInfoHandle * = e.APTR;
  377.  
  378. CONST
  379.  
  380. (* datachunk type identifiers *)
  381.  
  382.   dtagDisp *               = 80000000H;
  383.   dtagDims *               = 80001000H;
  384.   dtagMntr *               = 80002000H;
  385.   dtagName *               = 80003000H;
  386.   dtagVec  *               = 80004000H;   (* internal use only *)
  387.  
  388. TYPE
  389.  
  390.   QueryHeaderBase *= RECORD END;
  391.  
  392.   QueryHeader * = RECORD (QueryHeaderBase)
  393.     structID *  : e.ULONG;  (* datachunk type identifier *)
  394.     displayID * : e.ULONG;  (* copy of display record key   *)
  395.     skipID *    : e.ULONG;  (* tagSKIP -- see tagitems.h *)
  396.     length *    : e.ULONG;  (* length of local data in double-longwords *)
  397.   END; (* QueryHeader *)
  398.  
  399.   DisplayInfo * = RECORD (QueryHeaderBase)
  400.     header *        : QueryHeader;
  401.     notAvailable *  : s.SET16;  (* if NULL available, else see defines *)
  402.     propertyFlags * : s.SET32;  (* Properties of this mode see defines *)
  403.     resolution *    : Point;    (* ticks-per-pixel X/Y                 *)
  404.     pixelSpeed *    : e.UWORD;  (* aproximation in nanoseconds         *)
  405.     numStdSprites * : e.UWORD;  (* number of standard amiga sprites    *)
  406.     paletteRange *  : e.UWORD;  (* distinguishable shades available    *)
  407.     spriteResolution * : Point; (* std sprite ticks-per-pixel X/Y    *)
  408.     pad * : ARRAY 4 OF e.UBYTE; (* used internally *)
  409.     redBits *       : e.UBYTE;  (* number of Red bits this display supports (V39) *)
  410.     greenBits *     : e.UBYTE;  (* number of Green bits this display supports (V39) *)
  411.     blueBits *      : e.UBYTE;  (* number of Blue bits this display supports (V39) *)
  412.  (* pad2 * : ARRAY 5 OF e.UBYTE; (* find some use for this. *)
  413.     Allow for different alignment rules (?) *)
  414.     pad2 * : ARRAY 4 OF e.UBYTE; (* find some use for this. *)
  415.     reserved * : ARRAY 2 OF e.ULONG; (* terminator *)
  416.   END; (* DisplayInfo *)
  417.  
  418. CONST
  419.  
  420. (* availability *)
  421.  
  422.   availNoChips *        = {0};
  423.   availNoMonitor *      = {1};
  424.   availNotWithGenlock * = {2};
  425.  
  426. (* mode properties *)
  427.  
  428.   isLace *            = 0;
  429.   isDualPF *          = 1;
  430.   isPF2Pri *          = 2;
  431.   isHAM *             = 3;
  432.  
  433.   isECS *             = 4;  (*      note: ECS modes (SHIRES, VGA, and **
  434.                             **      PRODUCTIVITY) do not support      **
  435.                             **      attached sprites.                 **
  436.                             *)
  437.  
  438.   isAA *              = 16;  (* AA modes - may only be available
  439.                              ** if machine has correct memory
  440.                              ** type to support required
  441.                              ** bandwidth - check availability.
  442.                              ** (V39)
  443.                              *)
  444.  
  445.   isPAL     *          = 5;
  446.   isSprites *          = 6;
  447.   isGenlock *          = 7;
  448.  
  449.   isWB *               = 8;
  450.   isDraggable *        = 9;
  451.   isPanelled *         = 10;
  452.   isBeamSync *         = 11;
  453.  
  454.   isExtraHalfBrite *   = 12;
  455.  
  456. (* The following dipIs... flags are new for V39 *)
  457.   isSpritesAtt      * = 13;  (* supports attached sprites *)
  458.   isSpritesChngRes  * = 14;  (* supports variable sprite resolution *)
  459.   isSpritesBorder   * = 15;  (* sprite can be displayed in the border *)
  460.   isScanDbl         * = 17;  (* scan doubled *)
  461.   isSpritesChngBase * = 18;
  462.   isSpritesChngPri  * = 19;
  463.   isDBuffer         * = 20;  (* can support double buffering *)
  464.   isProgBeam        * = 21;  (* is a programmed beam-sync mode *)
  465.   isForeign         * = 31;  (* this mode is not native to the Amiga *)
  466.  
  467. TYPE
  468.  
  469.   DimensionInfo * = RECORD (QueryHeaderBase)
  470.     header *          : QueryHeader;
  471.     maxDepth *        : e.UWORD;      (* log2( max number of colors ) *)
  472.     minRasterWidth *  : e.UWORD;      (* minimum width in pixels      *)
  473.     minRasterHeight * : e.UWORD;      (* minimum height in pixels     *)
  474.     maxRasterWidth *  : e.UWORD;      (* maximum width in pixels      *)
  475.     maxRasterHeight * : e.UWORD;      (* maximum height in pixels     *)
  476.     nominal *         : Rectangle;    (* "standard" dimensions        *)
  477.     maxOScan *        : Rectangle;    (* fixed, hardware dependant    *)
  478.     videoOScan *      : Rectangle;    (* fixed, hardware dependant    *)
  479.     txtOScan *        : Rectangle;    (* editable via preferences     *)
  480.     stdOScan *        : Rectangle;    (* editable via preferences     *)
  481.     pad *             : ARRAY 14 OF e.UBYTE;
  482.     reserved *        : ARRAY 2 OF e.ULONG;          (* terminator *)
  483.   END; (* DimensionInfo *)
  484.  
  485.   MonitorInfo * = RECORD (QueryHeaderBase)
  486.     header *              : QueryHeader;
  487.     mspc *                : MonitorSpecPtr; (* pointer to monitor specification  *)
  488.     viewPosition *        : Point;          (* editable via preferences          *)
  489.     viewResolution *      : Point;          (* standard monitor ticks-per-pixel  *)
  490.     viewPositionRange *   : Rectangle;      (* fixed, hardware dependant *)
  491.     totalRows *           : e.UWORD;        (* display height in scanlines       *)
  492.     totalColorClocks *    : e.UWORD;        (* scanline width in 280 ns units    *)
  493.     minRow *              : e.UWORD;        (* absolute minimum active scanline  *)
  494.     compatibility *       : INTEGER;        (* how this coexists with others     *)
  495.     pad *                 : ARRAY 36 OF e.UBYTE;
  496.     defaultViewPosition * : Point;          (* original, never changes *)
  497.     preferredModeID *     : e.ULONG;        (* for Preferences *)
  498.     reserved *            : ARRAY 2 OF e.ULONG;          (* terminator *)
  499.   END; (* MonitorInfo *)
  500.  
  501. CONST
  502.  
  503. (* monitor compatibility *)
  504.  
  505.   mCompatMixed *   = 0;      (* can share display with other mcompatMIXED *)
  506.   mCompatSelf *    = 1;      (* can share only within same monitor *)
  507.   mCompatNobody *  = -1;     (* only one viewport at a time *)
  508.  
  509.   displayNameLen * = 32;
  510.  
  511. TYPE
  512.  
  513.   NameInfo * = RECORD (QueryHeaderBase)
  514.     header *   : QueryHeader;
  515.     name *     : ARRAY displayNameLen OF CHAR;
  516.     reserved * : ARRAY 2 OF e.ULONG;          (* terminator *)
  517.   END; (* NameInfo *)
  518.  
  519. (*
  520. **      $VER: modeid.h 39.9 (27.5.93)
  521. **
  522. **      graphics display mode IDs.
  523. *)
  524.  
  525. CONST
  526.  
  527. (* DisplayInfoRecord identifiers *)
  528.  
  529.   invalidID *             = -1; (* ~0 *)
  530.  
  531. (* With all the new modes that are available under V38 and V39, it is highly
  532.  * recommended that you use either the asl.library screenmode requester,
  533.  * and/or the V39 graphics.library function BestModeIDA().
  534.  *
  535.  * DO NOT interpret the any of the bits in the ModeID for its meaning. For
  536.  * example, do not interpret bit 3 (0x4) as meaning the ModeID is interlaced.
  537.  * Instead, use GetDisplayInfoData() with dtagDisp, and examine the dip...
  538.  * flags to determine a ModeID's characteristics. The only exception to
  539.  * this rule is that bit 7 (0x80) will always mean the ModeID is
  540.  * ExtraHalfBright, and bit 11 (0x800) will always mean the ModeID is HAM.
  541.  *)
  542.  
  543. (* normal identifiers *)
  544.  
  545.   monitorIDMask *         = 0FFFF1000H;
  546.  
  547.   defaultMonitorID *      = 00000000H;
  548.   ntscMonitorID *         = 00011000H;
  549.   palMonitorID *          = 00021000H;
  550.  
  551. (* the following 22 composite keys are for Modes on the default Monitor.
  552.  * NTSC & PAL "flavors" of these particular keys may be made by or'ing
  553.  * the NTSC or PAL monitorId with the desired modeKey...
  554.  *
  555.  * For example, to specifically open a PAL HAM interlaced ViewPort
  556.  * (or intuition screen), you would use the modeid of
  557.  * (palMonitorId | hamlaceKey)
  558.  *)
  559.  
  560.   loresKey *                   = 00000000H;
  561.   hiresKey *                   = 00008000H;
  562.   superKey *                   = 00008020H;
  563.   hamKey *                     = 00000800H;
  564.   loresLaceKey *               = 00000004H;
  565.   hiresLaceKey *               = 00008004H;
  566.   superLaceKey *               = 00008024H;
  567.   hamLaceKey *                 = 00000804H;
  568.   loresDPFKey *                = 00000400H;
  569.   hiresDPFKey *                = 00008400H;
  570.   superDPFKey *                = 00008420H;
  571.   loresLaceDPFKey *            = 00000404H;
  572.   hiresLaceDPFKey *            = 00008404H;
  573.   superLaceDPFKey *            = 00008424H;
  574.   loresDPF2Key *               = 00000440H;
  575.   hiresDPF2Key *               = 00008440H;
  576.   superDPF2Key *               = 00008460H;
  577.   loresLaceDPF2Key *           = 00000444H;
  578.   hiresLaceDPF2Key *           = 00008444H;
  579.   superLaceDPF2Key *           = 00008464H;
  580.   extraHalfBriteKey *          = 00000080H;
  581.   extraHalfBriteLaceKey *      = 00000084H;
  582. (* New for AA ChipSet (V39) *)
  583.   hiresHAMKey *                = 00008800H;
  584.   superHAMKey *                = 00008820H;
  585.   hiresEHBKey *                = 00008080H;
  586.   superEHBKey *                = 000080A0H;
  587.   hiresHAMLaceKey *            = 00008804H;
  588.   superHAMLaceKey *            = 00008824H;
  589.   hiresEHBLaceKey *            = 00008084H;
  590.   superEHBLaceKey *            = 000080A4H;
  591. (* Added for V40 - may be useful modes for some games or animations. *)
  592.   loresSDblKey *               = 00000008H;
  593.   loresHAMSDblKey *            = 00000808H;
  594.   loresEHBSDblKey *            = 00000088H;
  595.   hiresHAMSDblKey *            = 00008808H;
  596.  
  597.  
  598. (* vga identifiers *)
  599.  
  600.   vgaMonitorID *               = 00031000H;
  601.  
  602.   vgaExtraLoresKey *           = 00031004H;
  603.   vgaLoresKey *                = 00039004H;
  604.   vgaProductKey *              = 00039024H;
  605.   vgaHAMKey *                  = 00031804H;
  606.   vgaExtraLoresLaceKey *       = 00031005H;
  607.   vgaLoresLaceKey *            = 00039005H;
  608.   vgaProductLaceKey *          = 00039025H;
  609.   vgaHAMLaceKey *              = 00031805H;
  610.   vgaExtraLoresDPFKey *        = 00031404H;
  611.   vgaLoresDPFKey *             = 00039404H;
  612.   vgaProductDPFKey *           = 00039424H;
  613.   vgaExtraLoresLaceDPFKey *    = 00031405H;
  614.   vgaLoresLaceDPFKey *         = 00039405H;
  615.   vgaProductLaceDPFKey *       = 00039425H;
  616.   vgaExtraLoresDPF2Key *       = 00031444H;
  617.   vgaLoresDPF2Key *            = 00039444H;
  618.   vgaProductDPF2Key *          = 00039464H;
  619.   vgaExtraLoresLaceDPF2Key *   = 00031445H;
  620.   vgaLoresLaceDPF2Key *        = 00039445H;
  621.   vgaProductLaceDPF2Key *      = 00039465H;
  622.   vgaExtraHalfBriteKey *       = 00031084H;
  623.   vgaExtraHalfBriteLaceKey *   = 00031085H;
  624. (* New for AA ChipSet (V39) *)
  625.   vgaProductHAMKey *           = 00039824H;
  626.   vgaLoresHAMKey *             = 00039804H;
  627.   vgaExtraLoresHAMKey *        = vgaHAMKey;
  628.   vgaProductHAMLaceKey *       = 00039825H;
  629.   vgaLoresHAMLaceKey *         = 00039805H;
  630.   vgaExtraLoresHAMLaceKey *    = vgaHAMLaceKey;
  631.   vgaExtraLoresEHBKey *        = vgaExtraHalfBriteKey;
  632.   vgaExtraLoresEHBLaceKey *    = vgaExtraHalfBriteLaceKey;
  633.   vgaLoresEHBKey *             = 00039084H;
  634.   vgaLoresEHBLaceKey *         = 00039085H;
  635.   vgaEHBKey *                  = 000390A4H;
  636.   vgaEHBLaceKey *              = 000390A5H;
  637. (* These ModeIDs are the scandoubled equivalents of the above, with the
  638.  * exception of the DualPlayfield modes, as AA does not allow for scandoubling
  639.  * dualplayfield.
  640.  *)
  641.   vgaExtraLoresDblKey *        = 00031000H;
  642.   vgaLoresDblKey *             = 00039000H;
  643.   vgaProductDblKey *           = 00039020H;
  644.   vgaExtraLoresHAMDblKey *     = 00031800H;
  645.   vgaLoresHAMDblKey *          = 00039800H;
  646.   vgaProductHAMDblKey *        = 00039820H;
  647.   vgaExtraLoresEHBDblKey *     = 00031080H;
  648.   vgaLoresEHBDblKey *          = 00039080H;
  649.   vgaProductEHBDblKey *        = 000390A0H;
  650.  
  651. (* a2024 identifiers *)
  652.  
  653.   a2024MonitorID *             = 00041000H;
  654.  
  655.   a2024tenHertzKey *           = 00041000H;
  656.   a2024fifteenHertzKey *       = 00049000H;
  657.  
  658. (* prototype identifiers *)
  659.  
  660.   protoMonitorID *             = 00051000H;
  661.  
  662. (* These monitors and modes were added for the V38 release. *)
  663.  
  664.   euro72MonitorId *            = 000061000H;
  665.  
  666.   euro72ExtraLoresKey *        = 000061004H;
  667.   euro72LoresKey *             = 000069004H;
  668.   euro72ProductKey *           = 000069024H;
  669.   euro72HAMKey *               = 000061804H;
  670.   euro72ExtraLoresLaceKey *    = 000061005H;
  671.   euro72LoresLaceKey *         = 000069005H;
  672.   euro72ProductLaceKey *       = 000069025H;
  673.   euro72HAMLaceKey *           = 000061805H;
  674.   euro72ExtraLoresDPFKey *     = 000061404H;
  675.   euro72LoresDPFKey *          = 000069404H;
  676.   euro72ProductDPFKey *        = 000069424H;
  677.   euro72ExtraLoresLaceDPFKey * = 000061405H;
  678.   euro72LoresLaceDPFKey *      = 000069405H;
  679.   euro72ProductLaceDPFKey *    = 000069425H;
  680.   euro72ExtraLoresDPF2Key *    = 000061444H;
  681.   euro72LoresDPF2Key *         = 000069444H;
  682.   euro72ProductDPF2Key *       = 000069464H;
  683.   euro72ExtraLoresLaceDPF2Key * = 000061445H;
  684.   euro72LoresLaceDPF2Key *     = 000069445H;
  685.   euro72ProductLaceDPF2Key *   = 000069465H;
  686.   euro72ExtraHalfBriteKey *    = 000061084H;
  687.   euro72ExtraHalfBriteLaceKey * = 000061085H;
  688. (* New AA modes (V39) *)
  689.   euro72ProductHAMKey *        = 000069824H;
  690.   euro72ProductHAMLaceKey *    = 000069825H;
  691.   euro72LoresHAMKey *          = 000069804H;
  692.   euro72LoresHAMLaceKey *      = 000069805H;
  693.   euro72ExtraLoresHAMKey *     = euro72HAMKey;
  694.   euro72ExtraLoresHAMLaceKey * = euro72HAMLaceKey;
  695.   euro72ExtraLoresEHBKey *     = euro72ExtraHalfBriteKey;
  696.   euro72ExtraLoresEHBLaceKey * = euro72ExtraHalfBriteLaceKey;
  697.   euro72LoresEHBKey *          = 000069084H;
  698.   euro72LoresEHBLaceKey *      = 000069085H;
  699.   euro72EHBKey *               = 0000690A4H;
  700.   euro72EHBLaceKey *           = 0000690A5H;
  701. (* These ModeIDs are the scandoubled equivalents of the above, with the
  702.  * exception of the DualPlayfield modes, as AA does not allow for scandoubling
  703.  * dualplayfield.
  704.  *)
  705.   euro72ExtraLoresDblKey *     = 000061000H;
  706.   euro72LoresDblKey *          = 000069000H;
  707.   euro72ProductDblKey *        = 000069020H;
  708.   euro72ExtraLoresHAMDblKey *  = 000061800H;
  709.   euro72LoresHAMDblKey *       = 000069800H;
  710.   euro72ProductHAMDblKey *     = 000069820H;
  711.   euro72ExtraLoresEHBDblKey *  = 000061080H;
  712.   euro72LoresEHBDblKey *       = 000069080H;
  713.   euro72ProductEHBDblKey *     = 0000690A0H;
  714.  
  715.  
  716.   euro36MonitorId *            = 000071000H;
  717.  
  718. (* Euro36 modeids can be ORed with the default modeids a la NTSC and PAL.
  719.  * For example, Euro36 SuperHires is
  720.  * (EURO36_MONITOR_ID | SUPER_KEY)
  721.  *)
  722.  
  723.   super72MonitorId *           = 000081000H;
  724.  
  725. (* Super72 modeids can be ORed with the default modeids a la NTSC and PAL.
  726.  * For example, Super72 SuperHiresLace (800x600) is
  727.  * (SUPER72_MONITOR_ID | SUPER_LACE_KEY).
  728.  * The following scandoubled Modes are the exception:
  729.  *)
  730.   super72LoresDblKey *         = 000081008H;
  731.   super72HiresDblKey *         = 000089008H;
  732.   super72SuperDblKey *         = 000089028H;
  733.   super72LoresHAMDblKey *      = 000081808H;
  734.   super72HiresHAMDblKey *      = 000089808H;
  735.   super72SuperHAMDblKey *      = 000089828H;
  736.   super72LoresEHBDblKey *      = 000081088H;
  737.   super72HiresEHBDblKey *      = 000089088H;
  738.   super72SuperEHBDblKey *      = 0000890A8H;
  739.  
  740.  
  741. (* These monitors and modes were added for the V39 release. *)
  742.  
  743.   dblNTSCMonitorId *           = 000091000H;
  744.  
  745.   dblNTSCLoresKey *            = 000091000H;
  746.   dblNTSCLoresffKey *          = 000091004H;
  747.   dblNTSCLoresHAMKey *         = 000091800H;
  748.   dblNTSCLoresHAMFFKey *       = 000091804H;
  749.   dblNTSCLoresEHBKey *         = 000091080H;
  750.   dblNTSCLoresEHBFFKey *       = 000091084H;
  751.   dblNTSCLoresLaceKey *        = 000091005H;
  752.   dblNTSCLoresHAMLaceKey *     = 000091805H;
  753.   dblNTSCLoresEHBLaceKey *     = 000091085H;
  754.   dblNTSCLoresDPFKey *         = 000091400H;
  755.   dblNTSCLoresDPFFFKey *       = 000091404H;
  756.   dblNTSCLoresDPFLaceKey *     = 000091405H;
  757.   dblNTSCLoresDPF2Key *        = 000091440H;
  758.   dblNTSCLoresDPF2FFKey *      = 000091444H;
  759.   dblNTSCLoresDPF2LaceKey *    = 000091445H;
  760.   dblNTSCHiresKey *            = 000099000H;
  761.   dblNTSCHiresFFKey *          = 000099004H;
  762.   dblNTSCHiresHAMKey *         = 000099800H;
  763.   dblNTSCHiresHAMFFKey *       = 000099804H;
  764.   dblNTSCHiresLaceKey *        = 000099005H;
  765.   dblNTSCHiresHAMLaceKey *     = 000099805H;
  766.   dblNTSCHiresEHBKey *         = 000099080H;
  767.   dblNTSCHiresEHBFFKey *       = 000099084H;
  768.   dblNTSCHiresEHBLaceKey *     = 000099085H;
  769.   dblNTSCHiresDPFKey *         = 000099400H;
  770.   dblNTSCHiresDPFFFKey *       = 000099404H;
  771.   dblNTSCHiresDPFLaceKey *     = 000099405H;
  772.   dblNTSCHiresDPF2Key *        = 000099440H;
  773.   dblNTSCHiresDPF2FFKey *      = 000099444H;
  774.   dblNTSCHiresDPF2LaceKey *    = 000099445H;
  775.   dblNTSCExtraLoresKey *       = 000091200H;
  776.   dblNTSCExtraLoresHAMKey *    = 000091A00H;
  777.   dblNTSCExtraLoresEHBKey *    = 000091280H;
  778.   dblNTSCExtraLoresDPFKey *    = 000091600H;
  779.   dblNTSCExtraLoresDPF2Key *   = 000091640H;
  780.   dblNTSCExtraLoresFFKey *     = 000091204H;
  781.   dblNTSCExtraLoresHAMFFKey *  = 000091A04H;
  782.   dblNTSCExtraLoresEHBFFKey *  = 000091284H;
  783.   dblNTSCExtraLoresDPFFFKey *  = 000091604H;
  784.   dblNTSCExtraLoresDPF2FFKey * = 000091644H;
  785.   dblNTSCExtraLoresLaceKey *   = 000091205H;
  786.   dblNTSCExtraLoresHAMLaceKey * = 000091A05H;
  787.   dblNTSCExtraLoresEHBLaceKey * = 000091285H;
  788.   dblNTSCExtraLoresDPFLaceKey * = 000091605H;
  789.   dblNTSCExtraLoresDPF2LaceKey * = 000091645H;
  790.  
  791.   dblPALMonitorId *            = 0000A1000H;
  792.  
  793.   dblPALLoresKey *             = 0000A1000H;
  794.   dblPALLoresFFKey *           = 0000A1004H;
  795.   dblPALLoresHAMKey *          = 0000A1800H;
  796.   dblPALLoresHAMFFKey *        = 0000A1804H;
  797.   dblPALLoresEHBKey *          = 0000A1080H;
  798.   dblPALLoresEHBFFKey *        = 0000A1084H;
  799.   dblPALLoresLaceKey *         = 0000A1005H;
  800.   dblPALLoresHAMLaceKey *      = 0000A1805H;
  801.   dblPALLoresEHBLaceKey *      = 0000A1085H;
  802.   dblPALLoresDPFKey *          = 0000A1400H;
  803.   dblPALLoresDPFFFKey *        = 0000A1404H;
  804.   dblPALLoresDPFLaceKey *      = 0000A1405H;
  805.   dblPALLoresDPF2Key *         = 0000A1440H;
  806.   dblPALLoresDPF2FFKey *       = 0000A1444H;
  807.   dblPALLoresDPF2LaceKey *     = 0000A1445H;
  808.   dblPALHiresKey *             = 0000A9000H;
  809.   dblPALHiresFFKey *           = 0000A9004H;
  810.   dblPALHiresHAMKey *          = 0000A9800H;
  811.   dblPALHiresHAMFFKey *        = 0000A9804H;
  812.   dblPALHiresLaceKey *         = 0000A9005H;
  813.   dblPALHiresHAMLaceKey *      = 0000A9805H;
  814.   dblPALHiresEHBKey *          = 0000A9080H;
  815.   dblPALHiresEHBFFKey *        = 0000A9084H;
  816.   dblPALHiresEHBLaceKey *      = 0000A9085H;
  817.   dblPALHiresDPFKey *          = 0000A9400H;
  818.   dblPALHiresDPFFFKey *        = 0000A9404H;
  819.   dblPALHiresDPFLaceKey *      = 0000A9405H;
  820.   dblPALHiresDPF2Key *         = 0000A9440H;
  821.   dblPALHiresDPF2FFKey *       = 0000A9444H;
  822.   dblPALHiresDPF2LaceKey *     = 0000A9445H;
  823.   dblPALExtraLoresKey *        = 0000A1200H;
  824.   dblPALExtraLoresHAMKey *     = 0000A1A00H;
  825.   dblPALExtraLoresEHBKey *     = 0000A1280H;
  826.   dblPALExtraLoresDPFKey *     = 0000A1600H;
  827.   dblPALExtraLoresDPF2Key *    = 0000A1640H;
  828.   dblPALExtraLoresFFKey *      = 0000A1204H;
  829.   dblPALExtraLoresHAMFFKey *   = 0000A1A04H;
  830.   dblPALExtraLoresEHBFFKey *   = 0000A1284H;
  831.   dblPALExtraLoresDPFFFKey *   = 0000A1604H;
  832.   dblPALExtraLoresDPF2FFKey *  = 0000A1644H;
  833.   dblPALExtraLoresLaceKey *    = 0000A1205H;
  834.   dblPALExtraLoresHAMLaceKey * = 0000A1A05H;
  835.   dblPALExtraLoresEHBLaceKey * = 0000A1285H;
  836.   dblPALExtraLoresDPFLaceKey * = 0000A1605H;
  837.   dblPALExtraLoresDPF2LaceKey * = 0000A1645H;
  838.  
  839.  
  840. (* Use these tags for passing to BestModeID() (V39) *)
  841.  
  842.   specialFlags * = {isDualPF, isPF2Pri, isHAM, isExtraHalfBrite};
  843.  
  844.   bidTagDipfMustHave *         = 080000001H;             (* mask of the DIPF_ flags the ModeID must have *)
  845.                                 (* Default - NULL *)
  846.   bidTagDipfMustNotHave *      = 080000002H;             (* mask of the DIPF_ flags the ModeID must not have *)
  847.                                 (* Default - SPECIAL_FLAGS *)
  848.   bidTagViewPort *             = 080000003H;                  (* ViewPort for which a ModeID is sought. *)
  849.                                 (* Default - NULL *)
  850.   bidTagNominalWidth *         = 080000004H;              (*  together make the aspect ratio and *)
  851.   bidTagNominalHeight *        = 080000005H;             (* / override the vp->Width/Height. *)
  852.                                 (* Default - SourceID NominalDimensionInfo,
  853.                                  * or vp->DWidth/Height, or (640 * 200),
  854.                                  * in that preferred order.
  855.                                  *)
  856.   bidTagDesiredWidth *         = 080000006H;              (*  Nominal Width and Height of the *)
  857.   bidTagDesiredHeight *        = 080000007H;             (* / returned ModeID. *)
  858.                                 (* Default - same as Nominal *)
  859.   bidTagDepth *                = 080000008H;                    (* ModeID must support this depth. *)
  860.                                 (* Default - vp->RasInfo->BitMap->Depth or 1 *)
  861.   bidTagMonitorID *            = 080000009H;                  (* ModeID must use this monitor. *)
  862.                                 (* Default - use best monitor available *)
  863.   bidTagSourceID *             = 08000000AH;                   (* instead of a ViewPort. *)
  864.                                 (* Default - VPModeID(vp) if BID_TAG_ViewPort is
  865.                                  * specified, else leave the DIPFMustHave and
  866.                                  * DIPFMustNotHave values untouched.
  867.                                  *)
  868.   bidTagRedBits *              = 08000000BH;                   (*                             *)
  869.   bidTagBlueBits *             = 08000000CH;                  (* } Match up from the database *)
  870.   bidTagGreenBits *            = 08000000DH;                 (* /                            *)
  871.                                 (* Default - 4 *)
  872.   bidTagGfxPrivate *           = 08000000EH;                (* Private *)
  873.  
  874.  
  875. (*
  876. **      $VER: gels.h 39.0 (21.8.91)
  877. **
  878. **      definitions for AMIGA GELS (Graphics Elements)
  879. *)
  880.  
  881.  
  882. CONST
  883.  
  884. (* VSprite flags *)
  885. (* user-set VSprite flags: *)
  886.   sUserFlags *  = {0 .. 7};  (* mask of all user-settable VSprite-flags *)
  887.   vSprite *     = 0;         (* set if VSprite, clear if Bob *)
  888.   saveBack *    = 1;         (* set if background is to be saved/restored *)
  889.   overlay *     = 2;         (* set to mask image of Bob onto background *)
  890.   mustDraw *    = 3;         (* set if VSprite absolutely must be drawn *)
  891. (* system-set VSprite flags: *)
  892.   backSaved *   = 8;      (* this Bob's background has been saved *)
  893.   bobUpdate *   = 9;      (* temporary flag, useless to outside world *)
  894.   gelGone *     = 10;     (* set if gel is completely clipped (offscreen) *)
  895.   vsOverflow *  = 11;     (* VSprite overflow (if MUSTDRAW set we draw!) *)
  896.  
  897. (* Bob flags *)
  898. (* these are the user flag bits *)
  899.   bUserFlags *   = {0 .. 7}; (* mask of all user-settable Bob-flags *)
  900.   saveBob *      = 0;        (* set to not erase Bob *)
  901.   bobIsComp *    = 1;        (* set to identify Bob as AnimComp *)
  902. (* these are the system flag bits *)
  903.   bWaiting *     = 8;        (* set while Bob is waiting on 'after' *)
  904.   bDrawn *       = 9;        (* set when Bob is drawn this DrawG pass *)
  905.   bobsAway *     = 10;       (* set to initiate removal of Bob *)
  906.   bobNix *       = 11;       (* set when Bob is completely removed *)
  907.   savePreserve * = 12;       (* for back-restore during double-buffer *)
  908.   outStep *      = 13;       (* for double-clearing if double-buffer *)
  909.  
  910. (* defines for the animation procedures *)
  911.   anFracSize *  = 6;
  912.   animHalf *    = 0020H;
  913.   ringTrigger * = 0001H;
  914.  
  915.  
  916. TYPE
  917.  
  918. (* UserStuff definitions
  919.  *  the user can define these to be a single variable or a sub-structure
  920.  *  if undefined by the user, the system turns these into innocuous variables
  921.  *  see the manual for a thorough definition of the UserStuff definitions
  922.  *
  923. *)
  924.  
  925.   (* VSprite user stuff *)
  926.   VUserStuff * = INTEGER;
  927.  
  928.   (* Bob user stuff *)
  929.   BUserStuff * = INTEGER;
  930.  
  931.   (* AnimOb user stuff *)
  932.   AUserStuff * = INTEGER;
  933.  
  934.  
  935. (********************** * GEL STRUCTURES** ******************************** *)
  936.  
  937.   VSprite * = RECORD
  938. (* --------------------- SYSTEM VARIABLES ------------------------------- *)
  939. (* GEL linked list forward/backward pointers sorted by y,x value *)
  940.     nextVSprite * : VSpritePtr;
  941.     prevVSprite * : VSpritePtr;
  942.  
  943. (* GEL draw list constructed in the order the Bobs are actually drawn, then
  944.  *  list is copied to clear list
  945.  *  must be here in VSprite for system boundary detection
  946. *)
  947.     drawPath * : VSpritePtr;     (* pointer of overlay drawing *)
  948.     clearPath * : VSpritePtr;    (* pointer for overlay clearing *)
  949.  
  950. (* the VSprite positions are defined in (y,x) order to make sorting
  951.  *  sorting easier, since (y,x) as a long integer
  952. *)
  953.     oldY *, oldX * : INTEGER;          (* previous position *)
  954.  
  955. (* --------------------- COMMON VARIABLES --------------------------------- *)
  956.     flags * : s.SET16;       (* VSprite flags *)
  957.  
  958.  
  959. (* --------------------- USER VARIABLES ----------------------------------- *)
  960. (* the VSprite positions are defined in (y,x) order to make sorting
  961.  *  sorting easier, since (y,x) as a long integer
  962.  *)
  963.     y *, x * : INTEGER;                (* screen position *)
  964.  
  965.     height * : INTEGER;
  966.     width * : INTEGER;       (* number of words per row of image data *)
  967.     depth * : INTEGER;       (* number of planes of data *)
  968.  
  969.     meMask * : s.SET16;              (* which types can collide with this VSprite *)
  970.     hitMask * : s.SET16;             (* which types this VSprite can collide with *)
  971.  
  972.     imageData * : e.APTR;          (* pointer to VSprite image *)
  973.  
  974. (* borderLine is the one-dimensional logical OR of all
  975.  *  the VSprite bits, used for fast collision detection of edge
  976.  *)
  977.     borderLine * : e.APTR;         (* logical OR of all VSprite bits *)
  978.     collMask * : e.APTR;           (* similar to above except this is a matrix *)
  979.  
  980. (* pointer to this VSprite's color definitions (not used by Bobs) *)
  981.     sprColors * : e.APTR;
  982.  
  983.     vsBob * : BobPtr;        (* points home if this VSprite is part of
  984.                                    a Bob *)
  985.  
  986. (* planePick flag:  set bit selects a plane from image, clear bit selects
  987.  *  use of shadow mask for that plane
  988.  * OnOff flag: if using shadow mask to fill plane, this bit (corresponding
  989.  *  to bit in planePick) describes whether to fill with 0's or 1's
  990.  * There are two uses for these flags:
  991.  *      - if this is the VSprite of a Bob, these flags describe how the Bob
  992.  *        is to be drawn into memory
  993.  *      - if this is a simple VSprite and the user intends on setting the
  994.  *        MUSTDRAW flag of the VSprite, these flags must be set too to describe
  995.  *        which color registers the user wants for the image
  996.  *)
  997.     planePick * : s.SET8;
  998.     planeOnOff * : s.SET8;
  999.  
  1000.     vUserExt * : VUserStuff;      (* user definable:  see note above *)
  1001.   END; (* VSprite *)
  1002.  
  1003.  
  1004.   Bob * = RECORD
  1005. (* blitter-objects *)
  1006. (* --------------------- SYSTEM VARIABLES --------------------------------- *)
  1007.  
  1008. (* --------------------- COMMON VARIABLES --------------------------------- *)
  1009.     flags * : s.SET16;(* general purpose flags (see definitions below) *)
  1010.  
  1011. (* --------------------- USER VARIABLES ----------------------------------- *)
  1012.     saveBuffer * : e.APTR;   (* pointer to the buffer for background save *)
  1013.  
  1014. (* used by Bobs for "cookie-cutting" and multi-plane masking *)
  1015.     imageShadow * : e.APTR;
  1016.  
  1017. (* pointer to BOBs for sequenced drawing of Bobs
  1018.  *  for correct overlaying of multiple component animations
  1019.  *)
  1020.     before * : BobPtr; (* draw this Bob before Bob pointed to by before *)
  1021.     after * : BobPtr;  (* draw this Bob after Bob pointed to by after *)
  1022.  
  1023.     bobVSprite * : VSpritePtr;   (* this Bob's VSprite definition *)
  1024.  
  1025.     bobComp * : AnimCompPtr;      (* pointer to this Bob's AnimComp def *)
  1026.  
  1027.     dBuffer * : DBufPacketPtr;     (* pointer to this Bob's dBuf packet *)
  1028.  
  1029.     bUserExt * : BUserStuff;            (* Bob user extension *)
  1030. END; (* Bob *)
  1031.  
  1032.   AnimComp * = RECORD
  1033. (* --------------------- SYSTEM VARIABLES --------------------------------- *)
  1034.  
  1035. (* --------------------- COMMON VARIABLES --------------------------------- *)
  1036.     flags * : s.SET16;            (* AnimComp flags for system & user *)
  1037.  
  1038. (* timer defines how long to keep this component active:
  1039.  *  if set non-zero, timer decrements to zero then switches to nextSeq
  1040.  *  if set to zero, AnimComp never switches
  1041.  *)
  1042.     timer * : INTEGER;
  1043.  
  1044. (* --------------------- USER VARIABLES ----------------------------------- *)
  1045. (* initial value for timer when the AnimComp is activated by the system *)
  1046.     timeSet * : INTEGER;
  1047.  
  1048. (* pointer to next and previous components of animation object *)
  1049.     nextComp * : AnimCompPtr;
  1050.     prevComp * : AnimCompPtr;
  1051.  
  1052. (* pointer to component component definition of next image in sequence *)
  1053.     nextSeq * : AnimCompPtr;
  1054.     prevSeq * : AnimCompPtr;
  1055.  
  1056.     animCRoutine * : e.PROC; (* address of special animation procedure *)
  1057.  
  1058.     yTrans * : INTEGER;     (* initial y translation (if this is a component) *)
  1059.     xTrans * : INTEGER;     (* initial x translation (if this is a component) *)
  1060.  
  1061.     headOb * : AnimObPtr;
  1062.  
  1063.     animBob * : BobPtr;
  1064.   END; (* AnimComp *)
  1065.  
  1066.  
  1067.   AnimOb * = RECORD
  1068. (* --------------------- SYSTEM VARIABLES --------------------------------- *)
  1069.     nextOb *, prevOb * : AnimObPtr;
  1070.  
  1071. (* number of calls to Animate this AnimOb has endured *)
  1072.     clock * : LONGINT;
  1073.  
  1074.     anOldY *, anOldX * : INTEGER;            (* old y,x coordinates *)
  1075.  
  1076. (* --------------------- COMMON VARIABLES --------------------------------- *)
  1077.     anY *, anX * : INTEGER;                  (* y,x coordinates of the AnimOb *)
  1078.  
  1079. (* --------------------- USER VARIABLES ----------------------------------- *)
  1080.     yVel *, xVel * : INTEGER;                (* velocities of this object *)
  1081.     yAccel *, xAccell * : INTEGER;            (* accelerations of this object *)
  1082.  
  1083.     ringYTrans *, ringXTrans * : INTEGER;    (* ring translation values *)
  1084.  
  1085.     animoRoutine * : e.PROC;         (* address of special animation
  1086.                                        procedure *)
  1087.  
  1088.     headComp * : AnimCompPtr;     (* pointer to first component *)
  1089.  
  1090.     aUserExt * : AUserStuff;            (* AnimOb user extension *)
  1091.   END; (* AnimOb *)
  1092.  
  1093.   DBufPacket * = RECORD
  1094.     bufY *, bufX * : INTEGER;                (* save the other buffers screen coordinates *)
  1095.     bufPath * : VSpritePtr;      (* carry the draw path over the gap *)
  1096.  
  1097. (* these pointers must be filled in by the user *)
  1098. (* pointer to other buffer's background save buffer *)
  1099.     bufBuffer * : e.APTR;
  1100.   END; (* DBufPacket *)
  1101.  
  1102.  
  1103.  
  1104. CONST
  1105.  
  1106. (*** ********************************************************************** *)
  1107.  
  1108. (* these are GEL functions that are currently simple enough to exist as a
  1109.  *  definition.  It should not be assumed that this will always be the case
  1110.  *)
  1111.  
  1112. (*
  1113. #define InitAnimate(animKey) {*(animKey) = NULL;}
  1114. #define RemBob(b) {(b)->Flags |= BOBSAWAY;}
  1115. *)
  1116.  
  1117. (*** ********************************************************************** *)
  1118.  
  1119.   b2Norm *      = 0;
  1120.   b2Swap *      = 1;
  1121.   b2Bobber *    = 2;
  1122.  
  1123. (*** ********************************************************************** *)
  1124.  
  1125. TYPE
  1126.  
  1127.   CollTable * = RECORD
  1128.     collPtrs * : ARRAY 16 OF e.APTR;
  1129.   END; (* CollTable *)
  1130.  
  1131.  
  1132. (*
  1133. **      $VER: collide.h 37.0 (7.1.91)
  1134. **
  1135. **      definitions for collision detection and control
  1136. *)
  1137.  
  1138.  
  1139. CONST
  1140.  
  1141. (* These bit descriptors are used by the GEL collide routines.
  1142.  *  These bits are set in the hitMask and meMask variables of
  1143.  *  a GEL to describe whether or not these types of collisions
  1144.  *  can affect the GEL.  bndryHIT is described further below;
  1145.  *  this bit is permanently assigned as the boundary-hit flag.
  1146.  *  The other bit gelHIT is meant only as a default to cover
  1147.  *  any GEL hitting any other; the user may redefine this bit.
  1148.  *)
  1149.   borderHit * = 0;
  1150.  
  1151. (* These bit descriptors are used by the GEL boundry hit routines.
  1152.  *  When the user's boundry-hit routine is called (via the argument
  1153.  *  set by a call to SetCollision) the first argument passed to
  1154.  *  the user's routine is the address of the GEL involved in the
  1155.  *  boundry-hit, and the second argument has the appropriate bit(s)
  1156.  *  set to describe which boundry was surpassed
  1157.  *)
  1158.   topHit *    = 1;
  1159.   bottomHit * = 2;
  1160.   leftHit *   = 4;
  1161.   rightHit *  = 8;
  1162.  
  1163.  
  1164. (*
  1165. **      $VER: rastport.h 39.0 (21.8.91)
  1166. **
  1167. **      Graphics library rastport definitions
  1168. *)
  1169.  
  1170.  
  1171. TYPE
  1172.  
  1173.   AreaInfo * = RECORD
  1174.     vctrTbl * : e.APTR;         (* ptr to start of vector table *)
  1175.     vctrPtr * : e.APTR;         (* ptr to current vertex *)
  1176.     flagTbl * : e.APTR;         (* ptr to start of vector flag table *)
  1177.     flagPtr * : e.APTR;         (* ptrs to areafill flags *)
  1178.     count   * : INTEGER;        (* number of vertices in list *)
  1179.     maxCount * : INTEGER;         (* AreaMove/Draw will not allow Count>MaxCount *)
  1180.     firstX *, firstY * : INTEGER;    (* first point for this polygon *)
  1181.   END; (* AreaInfo *)
  1182.  
  1183.   TmpRas * = RECORD
  1184.     rasPtr * : e.APTR;
  1185.     size * : LONGINT;
  1186.   END; (* TmpRas *)
  1187.  
  1188.   GelsInfo * = RECORD
  1189.     sprRsrvd *       : SHORTINT; (* flag of which sprites to reserve from
  1190.                                     vsprite system *)
  1191.     flags *          : e.BYTE;   (* system use *)
  1192.     gelHead *,
  1193.     gelTail *        : VSpritePtr; (* dummy vSprites for list management *)
  1194.     (* pointer to array of 8 INTEGERS for sprite available lines *)
  1195.     nextLine *       : POINTER TO ARRAY 8 OF INTEGER;
  1196.     (* pointer to array of 8 pointers for color-last-assigned to vSprites *)
  1197.     lastColor *      : POINTER TO ARRAY 8 OF POINTER TO ARRAY 1 OF INTEGER;
  1198.     collHandler *    : CollTablePtr; (* addresses of collision routines *)
  1199.     leftmost *,
  1200.     rightmost *,
  1201.     topmost *,
  1202.     bottommost *     : INTEGER;
  1203.     firstBlissObj *,
  1204.     lastBlissObj *   : e.APTR;    (* system use only *)
  1205.   END; (* GelsInfo *)
  1206.  
  1207.   RastPort * = RECORD
  1208.     layer *        : LayerPtr;
  1209.     bitMap *       : BitMapPtr;
  1210.     areaPtrn *     : e.APTR;        (* ptr to areafill pattern *)
  1211.     tmpRas *       : TmpRasPtr;
  1212.     areaInfo *     : AreaInfoPtr;
  1213.     gelsInfo *     : GelsInfoPtr;
  1214.     mask *         : s.SET8;        (* write mask for this raster *)
  1215.     fgPen *        : SHORTINT;      (* foreground pen for this raster *)
  1216.     bgPen *        : SHORTINT;      (* background pen  *)
  1217.     aOlPen *       : SHORTINT;      (* areafill outline pen *)
  1218.     drawMode *     : s.SET8;        (* drawing mode for fill, lines, and text *)
  1219.     areaPtSz *     : SHORTINT;      (* 2^n words for areafill pattern *)
  1220.     linpatcnt *    : SHORTINT;      (* current line drawing pattern preshift *)
  1221.     dummy *        : SHORTINT;
  1222.     flags *        : s.SET16;       (* miscellaneous control bits *)
  1223.     linePtrn *     : e.UWORD;       (* 16 bits for textured lines *)
  1224.     x *, y *       : INTEGER;       (* current pen position *)
  1225.     minterms *     : ARRAY 8 OF e.UBYTE;
  1226.     penWidth *     : INTEGER;
  1227.     penHeight *    : INTEGER;
  1228.     font *         : TextFontPtr;   (* current font address *)
  1229.     algoStyle *    : s.SET8;        (* the algorithmically generated style *)
  1230.     txFlags *      : s.SET8;          (* text specific flags *)
  1231.     txHeight *     : e.UWORD;         (* text height *)
  1232.     txWidth *      : e.UWORD;          (* text nominal width *)
  1233.     txBaseline *   : e.UWORD;       (* text baseline *)
  1234.     txSpacing *    : INTEGER;        (* text spacing (per character) *)
  1235.     user *         : e.APTR;
  1236.     longreserved * : ARRAY 2 OF e.ULONG;
  1237.     wordreserved * : ARRAY 7 OF e.UWORD;  (* used to be a node *)
  1238.     reserved *     : ARRAY 8 OF e.UBYTE;      (* for future use *)
  1239.   END; (* RastPort *)
  1240.  
  1241. CONST
  1242.  
  1243. (* drawing modes *)
  1244.   jam1 *        = {};         (* jam 1 color into raster *)
  1245.   jam2 *        = {0};         (* jam 2 colors into raster *)
  1246.   complement *  = 1;         (* XOR bits into raster *)
  1247.   inversvid *   = 2;         (* inverse video for drawing modes *)
  1248.  
  1249. (* these are the flag bits for RastPort flags *)
  1250.   frstDot *    = 0;      (* draw the first dot of this line ? *)
  1251.   oneDot *     = 1;      (* use one dot mode for drawing lines *)
  1252.   dBuffer *    = 2;      (* flag set when RastPorts
  1253.                             are double-buffered *)
  1254.  
  1255.              (* only used for bobs *)
  1256.  
  1257.   areaOutline * = 3;      (* used by areafiller *)
  1258.   noCrossFill * = 5;      (* areafills have no crossovers *)
  1259.  
  1260. (* there is only one style of clipping: raster clipping *)
  1261. (* this preserves the continuity of jaggies regardless of clip window *)
  1262. (* When drawing into a RastPort, if the ptr to ClipRect is nil then there *)
  1263. (* is no clipping done, this is dangerous but useful for speed *)
  1264.  
  1265. (*
  1266. **      $VER: copper.h 39.10 (31.5.93)
  1267. **
  1268. **      graphics copper list intstruction definintions
  1269. *)
  1270.  
  1271.  
  1272. CONST
  1273.  
  1274.   move *  = 0;   (* pseude opcode for move #XXXX,dir *)
  1275.   wait *  = 1;   (* pseudo opcode for wait y,x *)
  1276.   next *  = 2;   (* continue processing with next buffer *)
  1277.   ntLof * = 15;  (* copper instruction only for short frames *)
  1278.   ntSht * = 14;  (* copper instruction only for long frames *)
  1279.   ntSys * = 13;  (* copper user instruction only *)
  1280.  
  1281. TYPE
  1282.  
  1283.   CopIns * = RECORD
  1284.     opCode * : INTEGER; (* 0 = move, 1 = wait *)
  1285.     destAddr *: INTEGER; (* vertical beam wait OR
  1286.                           * destination address of copper move *)
  1287.     destData *: INTEGER; (* beam wait position OR
  1288.                           * destination immediate data to send *)
  1289.   END; (* CopIns *)
  1290.  
  1291.   CopInsCL * = RECORD
  1292.     opCode * : INTEGER;
  1293.     nxtlist * : CopListDummyPtr;
  1294.   END; (* CopInsCL *)
  1295.  
  1296. TYPE
  1297.  
  1298.   Cprlist * = RECORD
  1299.     next *     : CprlistPtr;
  1300.     start *    : e.APTR;         (* start of copper list *)
  1301.     maxCount * : INTEGER;        (* number of long instructions *)
  1302.   END; (* Cprlist *)
  1303.  
  1304.   CopListDummy * = RECORD END;
  1305.  
  1306.   CopList * = RECORD (CopListDummy)
  1307.     next *      : CopListPtr;     (* next block for this copper list *)
  1308.     copList *   : CopListPtr;     (* system use *)
  1309.     viewPort *  : ViewPortPtr;    (* system use *)
  1310.     copIns *    : CopInsPtr;      (* start of this block *)
  1311.     copPtr *    : CopInsPtr;      (* intermediate ptr *)
  1312.     copLStart * : e.APTR;         (* mrgcop fills this in for Long Frame *)
  1313.     copSStart * : e.APTR;         (* mrgcop fills this in for Short Frame *)
  1314.     count *     : INTEGER;        (* intermediate counter *)
  1315.     maxCount *  : INTEGER;        (* max # of copins for this block *)
  1316.     dyOffset *  : INTEGER;        (* offset this copper list vertical waits *)
  1317.     slRepeat *  : INTEGER;
  1318.     flags *     : s.SET16;
  1319.   END; (* CopList *)
  1320.  
  1321.   CopList13 = RECORD (CopListDummy)
  1322.     next *      : CopList13Ptr;   (* next block for this copper list *)
  1323.     copList *   : CopList13Ptr;   (* system use *)
  1324.     viewPort *  : ViewPortPtr;    (* system use *)
  1325.     copIns *    : CopInsPtr;      (* start of this block *)
  1326.     copPtr *    : CopInsPtr;      (* intermediate ptr *)
  1327.     copLStart * : e.APTR;         (* mrgcop fills this in for Long Frame *)
  1328.     copSStart * : e.APTR;         (* mrgcop fills this in for Short Frame *)
  1329.     count *     : INTEGER;        (* intermediate counter *)
  1330.     maxCount *  : INTEGER;        (* max # of copins for this block *)
  1331.     dyOffset *  : INTEGER;        (* offset this copper list vertical waits *)
  1332.     cop2Start * : e.APTR;
  1333.     cop3Start * : e.APTR;
  1334.     cop4Start * : e.APTR;
  1335.     cop5Start * : e.APTR;
  1336.     slRepeat  * : INTEGER;
  1337.     flags     * : s.SET16;
  1338.   END; (* CopList13 *)
  1339.  
  1340.   UCopList * = RECORD
  1341.     next *         : UCopListPtr;
  1342.     firstCopList * : CopListDummyPtr; (* head node of this copper list *)
  1343.     copList *      : CopListDummyPtr; (* node in use *)
  1344.   END; (* UCopList *)
  1345.  
  1346. (* private graphics data structure *)
  1347.  
  1348.   CopinitPtr = POINTER TO Copinit;
  1349.   Copinit = RECORD
  1350.     vsyncHblank : ARRAY 2 OF e.UWORD;
  1351.     diagstrt    : ARRAY 12 OF e.UWORD; (* copper list for first bitplane *)
  1352.     fm0         : ARRAY 2 OF e.UWORD;
  1353.     diwstart    : ARRAY 10 OF e.UWORD;
  1354.     bplcon2     : ARRAY 2 OF e.UWORD;
  1355.     sprfix      : ARRAY 2*8 OF e.UWORD;
  1356.     sprstrtup   : ARRAY (2*8*2) OF e.UWORD;
  1357.     wait14      : ARRAY 2 OF e.UWORD;
  1358.     normHblank  : ARRAY 2 OF e.UWORD;
  1359.     jump        : ARRAY 2 OF e.UWORD;
  1360.     waitForever : ARRAY 6 OF e.UWORD;
  1361.     sprstop     : ARRAY 8 OF e.UWORD;
  1362.   END; (* Copinit *)
  1363.  
  1364.  
  1365. (*
  1366. **      $VER: view.h 39.34 (31.5.93)
  1367. **
  1368. **      graphics view/viewport definintions
  1369. *)
  1370.  
  1371. TYPE
  1372.  
  1373.   ViewPort * = RECORD
  1374.     next *             : ViewPortPtr;
  1375.     colorMap *         : ColorMapPtr;     (* table of colors for this viewport *)
  1376.                                           (* if this is nil, MakeVPort assumes default values *)
  1377.     dspIns *           : CopListDummyPtr; (* user by MakeView() *)
  1378.     sprIns *           : CopListDummyPtr; (* used by sprite stuff *)
  1379.     clrIns *           : CopListDummyPtr; (* used by sprite stuff *)
  1380.     uCopIns *          : UCopListPtr;     (* User copper list *)
  1381.     dWidth *, dHeight * : INTEGER;
  1382.     dxOffset *, dyOffset * : INTEGER;
  1383.     modes *            : s.SET16;
  1384.     spritePriorities * : SHORTINT;        (* used by makevp *)
  1385.     extendedModes *    : SHORTINT;
  1386.     rasInfo *          : RasInfoPtr;
  1387.   END; (* ViewPort *)
  1388.  
  1389.   View * = RECORD
  1390.     viewPort *   : ViewPortPtr;
  1391.     lofCprList * : CprlistPtr;        (* used for interlaced and noninterlaced *)
  1392.     shfCprList * : CprlistPtr;        (* only used during interlace *)
  1393.     dyOffset *, dxOffset * : INTEGER; (* for complete View positioning *)
  1394.                                       (* offsets are +- adjustments to standard #s *)
  1395.     modes *      : s.SET16;           (* such as INTERLACE, GENLOC *)
  1396.   END; (* View *)
  1397.  
  1398. (* these structures are obtained via GfxNew *)
  1399. (* and disposed by GfxFree *)
  1400.   ViewExtra * = RECORD (ExtendedNodeBase)
  1401.     n *       : ExtendedNode;
  1402.     view *    : ViewPtr;        (* backwards link *)
  1403.     monitor * : MonitorSpecPtr; (* monitors for this view *)
  1404.     topLine * :  e.UWORD;
  1405.   END; (* ViewExtra *)
  1406.  
  1407. (* this structure is obtained via GfxNew *)
  1408. (* and disposed by GfxFree *)
  1409.   ViewPortExtra * = RECORD (ExtendedNodeBase)
  1410.     n *           : ExtendedNode;
  1411.     viewPort *    : ViewPortPtr;        (* backwards link *)
  1412.     displayClip * : Rectangle;          (* makevp display clipping information *)
  1413.     (* These are added for V39 *)
  1414.     vecTable      : e.APTR;             (* Private *)
  1415.     driverData *  : ARRAY 2 OF e.APTR;
  1416.     flags *       : s.SET16;
  1417.     origin *      : ARRAY 2 OF Point;   (* First visible point relative to the DClip.
  1418.                                          * One for each possible playfield.
  1419.                                          *)
  1420.     cop1ptr       : e.ULONG;            (* private *)
  1421.     cop2ptr       : e.ULONG;            (* private *)
  1422.   END; (* ViewPortExtra *)
  1423.  
  1424. CONST
  1425.  
  1426. (* All these vpx flags are private *)
  1427.   vpxbFreeMe       = 0;
  1428.   vpxbLast         = 1;
  1429.   vpxbStraddles256 = 4;
  1430.   vpxbStraddles512 = 5;
  1431.  
  1432.   extendVStruct *  = 12;  (* unused bit in Modes field of View *)
  1433.  
  1434. (* VP_ fields internal only *)
  1435.   a2024 * = 6;
  1436.   tenhz * = 4;
  1437.  
  1438. (* defines used for Modes in IVPargs *)
  1439.  
  1440.   genLockVideo *   = 1;
  1441.   lace *           = 2;
  1442.   doubleScan *     = 3;
  1443.   superHires *     = 5;
  1444.   pfba *           = 6;
  1445.   extraHalfBrite * = 7;
  1446.   genlockAudio *   = 8;
  1447.   dualpf *         = 10;
  1448.   ham *            = 11;
  1449.   extendedMode *   = 12;
  1450.   vpHide *         = 13;
  1451.   sprites *        = 14;
  1452.   hires *          = 15;
  1453.  
  1454. TYPE
  1455.  
  1456. (* used by callers to and InitDspC() *)
  1457.  
  1458.   RasInfo * = RECORD
  1459.     next *   : RasInfoPtr;          (* used for dualpf *)
  1460.     bitMap * : BitMapPtr;
  1461.     rxOffset *, ryOffset : INTEGER; (* scroll offsets in this BitMap *)
  1462.   END; (* RasInfo *)
  1463.  
  1464.   ColorMap * = RECORD
  1465.     flags *             : s.SET8;
  1466.     type *              : SHORTINT;
  1467.     count *             : e.UWORD;
  1468.     colorTable *        : e.APTR;
  1469.     vpe *               : ViewPortExtraPtr;
  1470.     lowColorBits *      : e.APTR;
  1471.     transparencyPlane * : SHORTINT;
  1472.     spriteResolution *  : e.UBYTE;
  1473.     spriteResDefault *  : e.UBYTE;      (* what resolution you get when you have set SPRITERESN_DEFAULT *)
  1474.     auxFlags *          : s.SET8;
  1475.     vp *                : ViewPortPtr;
  1476.     normalDisplayInfo * : DisplayInfoPtr;
  1477.     coerceDisplayInfo * : DisplayInfoPtr;
  1478.     cmBatchItems *      : u.TagListPtr;
  1479.     vpModeID *          : e.ULONG;
  1480.     palExtra *          : PaletteExtraPtr;
  1481.     spriteBaseEven *    : e.UWORD;
  1482.     spriteBaseOdd *     : e.UWORD;
  1483.     bp0base *           : e.UWORD;
  1484.     bp1base *           : e.UWORD;
  1485.   END; (* ColorMap *)
  1486.  
  1487. CONST
  1488.  
  1489. (* if Type == 0 then ColorMap is V1.2/V1.3 compatible *)
  1490. (* if Type != 0 then ColorMap is V38       compatible *)
  1491. (* the system will never create other than V39 type colormaps when running V39 *)
  1492.  
  1493.   colorMapTypeV12 *      = 0;
  1494.   colorMapTypeV14 *      = 1;
  1495.   colorMapTypeV36 *      = colorMapTypeV14;    (* use this definition *)
  1496.   colorMapTypeV39 *      = 2;
  1497.  
  1498. (* Flags variable *)
  1499.   colorMapTransparency *   = 0;
  1500.   colorPlaneTransparency * = 1;
  1501.   borderBlanking *         = 2;
  1502.   borderNoTransparency *   = 3;
  1503.   videoControlBatch *      = 4;
  1504.   userCopperClip *         = 5;
  1505.   borderSprites *          = 6;
  1506.  
  1507.   cmfCmTrans * = 0;
  1508.   cmfCpTrans * = 1;
  1509.   cmfBrdrBlnk * = 2;
  1510.   cmfBrdnTran * = 3;
  1511.   cmfBrdrSprt * = 6;
  1512.  
  1513.   resnEcs * = 0;
  1514. (* ^140ns, except in 35ns viewport, where it is 70ns. *)
  1515.   resn140ns * = 1;
  1516.   resn70ns * = 2;
  1517.   resn35ns * = 3;
  1518.   resnDefault * = -1;
  1519.  
  1520. (* AuxFlags : *)
  1521.   fullPalette * = 0;
  1522.   noIntermedUpdate * = 1;
  1523.   noColorLoad * = 2;
  1524.   dualPFDisable * = 3;
  1525.  
  1526. TYPE
  1527.  
  1528.   (* structure may be extended so watch out! *)
  1529.  
  1530.   (* thanks for the warning :-) [fjc] *)
  1531.   PaletteExtraBase *= RECORD (e.SignalSemaphoreBase) END;
  1532.  
  1533.   PaletteExtra * = RECORD (PaletteExtraBase)
  1534.     semaphore *      :  e.SignalSemaphore;    (* shared semaphore for arbitration     *)
  1535.     firstFree        :  e.UWORD;              (* *private*                            *)
  1536.     nFree *          :  e.UWORD;              (* number of free colors                *)
  1537.     firstShared      :  e.UWORD;              (* *private*                            *)
  1538.     nShared          :  e.UWORD;              (* *private*                            *)
  1539.     refCnt           :  e.APTR;               (* *private*                            *)
  1540.     allocList        :  e.APTR;               (* *private*                            *)
  1541.     viewPort *       :  ViewPortPtr;          (* back pointer to viewport             *)
  1542.     sharableColors * :  e.UWORD;              (* the number of sharable colors.       *)
  1543.   END;
  1544.  
  1545. CONST
  1546.  
  1547. (* flags values for ObtainPen *)
  1548.  
  1549.   penbExclusive * = 0;
  1550.   penbNoSetColor * = 1;
  1551.  
  1552. (* precision values for ObtainBestPen : *)
  1553.  
  1554.   precisionExact * = -1;
  1555.   precisionImage * = 0;
  1556.   precisionIcon * = 16;
  1557.   precisionGui * = 32;
  1558.  
  1559.  
  1560. (* tags for ObtainBestPen: *)
  1561.   obpPrecision * = 084000000H;
  1562.   obpFailIfBad * = 084000001H;
  1563.  
  1564. (* From V39, MakeVPort() will return an error if there is not enough memory,
  1565.  * or the requested mode cannot be opened with the requested depth with the
  1566.  * given bitmap (for higher bandwidth alignments).
  1567.  *)
  1568.  
  1569.   mvpOk * = 0;                  (* you want to see this one *)
  1570.   mvpNoMem * = 1;               (* insufficient memory for intermediate workspace *)
  1571.   mvpNoVpe * = 2;               (* ViewPort does not have a ViewPortExtra, and
  1572.                                  * insufficient memory to allocate a temporary one.
  1573.                                  *)
  1574.   mvpNoDspins * = 3;            (* insufficient memory for intermidiate copper
  1575.                                  * instructions.
  1576.                                  *)
  1577.   mvpNoDisplay * = 4;           (* BitMap data is misaligned for this viewport's
  1578.                                  * mode and depth - see AllocBitMap().
  1579.                                  *)
  1580.   mvpOffBottom = 5;             (* PRIVATE - you will never see this. *)
  1581.  
  1582. (* From V39, MrgCop() will return an error if there is not enough memory,
  1583.  * or for some reason MrgCop() did not need to make any copper lists.
  1584.  *)
  1585.  
  1586.   mcopOk * = 0;                 (* you want to see this one *)
  1587.   mcopNoMem * = 1;              (* insufficient memory to allocate the system
  1588.                                  * copper lists.
  1589.                                  *)
  1590.   mcopNop * = 2;                (* MrgCop() did not merge any copper lists
  1591.                                  * (eg, no ViewPorts in the list, or all marked as
  1592.                                  * hidden).
  1593.                                  *)
  1594.  
  1595. TYPE
  1596.  
  1597.   DBufInfo  * = RECORD
  1598.     link1 *       : e.APTR;
  1599.     count1 *      : e.ULONG;
  1600.     safeMessage * : e.Message;  (* replied to when safe to write to old bitmap *)
  1601.     userData1 *   : e.APTR;     (* first user data *)
  1602.  
  1603.     link2 *       : e.APTR;
  1604.     count2 *      : e.ULONG;
  1605.     dispMessage * : e.Message;  (* replied to when new bitmap has been displayed at least
  1606.                                    once *)
  1607.     userData2 *   : e.APTR;     (* second user data *)
  1608.     matchLong *   : e.ULONG;
  1609.     copPtr1 *     : e.APTR;
  1610.     copPtr2 *     : e.APTR;
  1611.     copPtr3 *     : e.APTR;
  1612.     beamPos1 *    : e.UWORD;
  1613.     beamPos2 *    : e.UWORD;
  1614.   END;
  1615.  
  1616.  
  1617. (*
  1618. **      $VER: layers.h 39.4 (14.4.92)
  1619. **
  1620. **      graphics library layers definitions
  1621. *)
  1622.  
  1623.  
  1624. CONST
  1625.  
  1626.   layerSimple *           = 0;
  1627.   layerSmart *            = 1;
  1628.   layerSuper *            = 2;
  1629.   layerUpdating *         = 4;
  1630.   layerBackdrop *         = 6;
  1631.   layerRefresh *          = 7;
  1632.   layerIRefresh *         = 9;
  1633.   layerIRefresh2 *        = 10;
  1634.   layerClipRectsLost *    = 8;   (* during BeginUpdate *)
  1635.                                  (* or during layerop *)
  1636.                                  (* this happens if out of memory *)
  1637.   lmnRegion * = -1;              (* removed in V39 includes *)
  1638.  
  1639. TYPE
  1640.  
  1641.   LayerInfo * = RECORD
  1642.     topLayer *      : LayerPtr;
  1643.     lp              : LayerPtr;           (* !! Private !! *)
  1644.     obs *           : ClipRectPtr;
  1645.     freeClipRects   : ClipRectPtr;        (* !! Private !! *)
  1646.     privateReserve1 : LONGINT;            (* !! Private !! *)
  1647.     privateReserve2 : LONGINT;            (* !! Private !! *)
  1648.     lock            : e.SignalSemaphore;  (* !! Private !! *)
  1649.     gsHead          : e.MinList;          (* !! Private !! *)
  1650.     privateReserve3 : INTEGER;            (* !! Private !! *)
  1651.     privateReserve4 : e.APTR;             (* !! Private !! *)
  1652.     flags *         : s.SET16;
  1653.     count           : SHORTINT;           (* !! Private !! *)
  1654.     lockLayersCount : SHORTINT;           (* !! Private !! *)
  1655.     privateReserve5 : INTEGER;            (* !! Private !! *)
  1656.     blankHook       : e.APTR;             (* !! Private !! *)
  1657.     layerInfoExtra  : e.APTR;             (* !! Private !! *)
  1658.   END; (* LayerInfo *)
  1659.  
  1660. CONST
  1661.  
  1662.   newLayerInfoCalled * = 1;
  1663.   alertLayersNoMem   * = 83010000H;  (* removed in V39 includes *)
  1664.  
  1665. (*
  1666.  * layersNoBackfill is the value needed to get no backfill hook
  1667.  * layersBackfill is the value needed to get the default backfill hook
  1668.  *)
  1669.   noBackfill * = SYS.VAL (u.HookPtr, 1);
  1670.   backfill   * = NIL;
  1671.  
  1672.  
  1673. (*
  1674. **      $VER: clip.h 39.0 (2.12.91)
  1675. **
  1676. **      Graphics library clip definitions
  1677. *)
  1678.  
  1679.  
  1680. TYPE
  1681.  
  1682.   Layer * = RECORD
  1683.     front -, back -      : LayerPtr;
  1684.     clipRect -           : ClipRectPtr;  (* read by roms to find first cliprect *)
  1685.     rp -                 : RastPortPtr;
  1686.     bounds -             : Rectangle;
  1687.     reserved -           : ARRAY 4 OF e.UBYTE;
  1688.     priority -           : e.UWORD;   (* system use only *)
  1689.     flags -              : s.SET16;(* obscured ?, Virtual BitMap? *)
  1690.     superBitMap -        : BitMapPtr;
  1691.     superClipRect -      : ClipRectPtr;  (* super bitmap cliprects if VBitMap != 0 *)
  1692.                                          (* else damage cliprect list for refresh *)
  1693.     window -             : e.APTR;    (* reserved for user interface use *)
  1694.     scrollX -, scrollY - : INTEGER;
  1695.     cr -, cr2 -, crnew - : ClipRectPtr;  (* used by dedice *)
  1696.     superSaveClipRects - : ClipRectPtr;  (* preallocated cr's *)
  1697.     cliprects -          : ClipRectPtr;  (* system use during refresh *)
  1698.     layerInfo -          : LayerInfoPtr; (* points to head of the list *)
  1699.     lock -               : e.SignalSemaphore;
  1700.     backFill -           : u.HookPtr;
  1701.     reserved1 -          : e.ULONG;
  1702.     clipRegion -         : RegionPtr;
  1703.     saveClipRects -      : RegionPtr;    (* used to back out when in trouble *)
  1704.     width -, height -    : INTEGER;      (* system use *)
  1705.     reserved2 -          : ARRAY 18 OF e.UBYTE;
  1706.     (* this must stay here *)
  1707.     damageList -         : RegionPtr;    (* list of rectangles to refresh
  1708.                                             through *)
  1709.   END; (* Layer *)
  1710.  
  1711.   ClipRect * = RECORD
  1712.     next *     : ClipRectPtr;  (* roms used to find next ClipRect *)
  1713.     prev *     : ClipRectPtr;  (* Temp use in layers (private) *)
  1714.     lobs *     : LayerPtr;     (* Private use for layers *)
  1715.     bitMap *   : BitMapPtr;    (* Bitmap for layers private use *)
  1716.     bounds *   : Rectangle;    (* bounds of cliprect *)
  1717.     p1 *, p2 * : ClipRectPtr;  (* system reserved *)
  1718.     reserved * : LONGINT;      (* system use (Layers private) *)
  1719.     flags *    : s.SET32;      (* Layers private field for cliprects *)
  1720.                                (* that layers allocates... *)
  1721.                                (* MUST be multiple of 8 bytes to buffer *)
  1722.   END; (* ClipRect *)
  1723.  
  1724. CONST
  1725.  
  1726. (* internal cliprect flags *)
  1727.   needsNoConcealedRasters = 1;
  1728.   needsNoLayerblitDamage  = 2;
  1729.  
  1730. (* defines for code values for getcode *)
  1731.   isLessX * = 1;
  1732.   isLessY * = 2;
  1733.   isGrtrX * = 4;
  1734.   isGrtrY * = 8;
  1735.  
  1736.  
  1737. (*
  1738. **      $VER: regions.h 39.0 (21.8.91)
  1739. **
  1740. **      Graphics region definitions
  1741. *)
  1742.  
  1743.  
  1744. TYPE
  1745.  
  1746.   RegionRectangle * = RECORD
  1747.     next *, prev * : RegionRectanglePtr;
  1748.     bounds *       : Rectangle;
  1749.   END; (* RegionRectangle *)
  1750.  
  1751.   Region * = RECORD (RectangleBase)
  1752.     bounds *          : Rectangle;
  1753.     regionRectangle * : RegionRectanglePtr;
  1754.   END; (* Region *)
  1755.  
  1756.  
  1757. (*
  1758. **      $VER: sprite.h 39.6 (16.6.92)
  1759. **
  1760. **      Graphics sprite definitions
  1761. *)
  1762.  
  1763. CONST
  1764.  
  1765.   spriteAttached * = 80H;
  1766.  
  1767. TYPE
  1768.  
  1769.   SimpleSpriteBase *= RECORD END;
  1770.  
  1771.   SimpleSprite * = RECORD (SimpleSpriteBase)
  1772.     posctldata * : e.APTR;
  1773.     height *     : e.UWORD;
  1774.     x *, y *     : e.UWORD;    (* current position *)
  1775.     num *        : e.UWORD;
  1776.   END; (* SimpleSprite *)
  1777.  
  1778.   ExtSprite * = RECORD (SimpleSpriteBase)
  1779.     simpleSprite * : SimpleSprite;    (* conventional simple sprite structure *)
  1780.     wordWidth *    : e.UWORD;         (* graphics use only, subject to change *)
  1781.     flags *        : s.SET16;         (* graphics use only, subject to change *)
  1782.   END;
  1783.  
  1784. CONST
  1785.  
  1786. (* tags for AllocSpriteData() *)
  1787.   spriteaWidth *         = 081000000H;
  1788.   spriteaXreplication *  = 081000002H;
  1789.   spriteaYreplication *  = 081000004H;
  1790.   spriteaOutputheight *  = 081000006H;
  1791.   spriteaAttached *      = 081000008H;
  1792.   spriteaOlddataformat * = 08100000AH; (* MUST pass in outputheight if using this tag *)
  1793.  
  1794. (* tags for GetExtSprite() *)
  1795.   gstagSpriteNum *       = 082000020H;
  1796.   gstagAttached *        = 082000022H;
  1797.   gstagSoftsprite *      = 082000024H;
  1798.  
  1799. (* tags valid for either GetExtSprite or ChangeExtSprite *)
  1800.   gstagScandoubled *     = 083000000H; (* request "NTSC-Like" height if possible. *)
  1801.  
  1802.  
  1803. (*
  1804. **      $VER: text.h 39.0 (21.8.91)
  1805. **
  1806. **      graphics library text structures
  1807. *)
  1808.  
  1809.  
  1810. CONST
  1811.  
  1812. (* ------ Font Styles ------------------------------------------------ *)
  1813.   normal *      = {};      (* normal text (no style bits set) *)
  1814.   normalFont *  = {};      (* prehistoric synonym             *)
  1815.   underlined *  = 0;       (* underlined (under baseline) *)
  1816.   bold *        = 1;       (* bold face text (ORed w/ shifted) *)
  1817.   italic *      = 2;       (* italic (slanted 1:2 right) *)
  1818.   extended *    = 3;       (* extended face (wider than normal) *)
  1819.  
  1820.   colorfont *   = 6;       (* this uses ColorTextFont structure *)
  1821.   tagged *      = 7;       (* the TextAttr is really an TTextAttr, *)
  1822.  
  1823. (* ------ Font Flags ------------------------------------------------- *)
  1824.   romFont *      = 0;     (* font is in rom *)
  1825.   diskFont *     = 1;     (* font is from diskfont.library *)
  1826.   revPath *      = 2;     (* designed path is reversed (e.g. left) *)
  1827.   tallDot *      = 3;     (* designed for hires non-interlaced *)
  1828.   wideDot *      = 4;     (* designed for lores interlaced *)
  1829.   proportional * = 5;     (* character sizes can vary from nominal *)
  1830.   designed *     = 6;     (* size explicitly designed, not constructed *)
  1831.                           (* note: if you do not set this bit in your *)
  1832.                           (* textattr, then a font may be constructed *)
  1833.                           (* for you by scaling an existing rom or disk *)
  1834.                           (* font (under V36 and above). *)
  1835.   (* bit 7 is always clear for fonts on the graphics font list *)
  1836.   removed *     = 7;      (* the font has been removed *)
  1837.  
  1838. TYPE
  1839.  
  1840. (****** TextAttr node, matches text attributes in RastPort **********)
  1841.   TextAttr * = RECORD
  1842.     name *  : e.LSTRPTR;         (* name of the font *)
  1843.     ySize * : e.UWORD;          (* height of the font *)
  1844.     style * : s.SET8;           (* intrinsic font style *)
  1845.     flags * : s.SET8;           (* font preferences and flags *)
  1846.   END; (* TextAttr *)
  1847.  
  1848.   TTextAttr * = RECORD
  1849.     name *  : e.LSTRPTR;        (* name of the font *)
  1850.     ySize * : e.UWORD;         (* height of the font *)
  1851.     style * : s.SET8;          (* intrinsic font style *)
  1852.     flags * : s.SET8;          (* font preferences and flags *)
  1853.     tags *  : u.TagListPtr;    (* extended attributes *)
  1854.   END; (* TTextAttr *)
  1855.  
  1856.  
  1857. CONST
  1858.  
  1859. (****** Text Tags ************************************************** *)
  1860.   deviceDPI * = u.user+1;    (* Tag value is Point union: *)
  1861.                              (* Hi word XDPI, Lo word YDPI *)
  1862.  
  1863.   maxFontMatchweight *      = 32767;   (* perfect match from WeighTAMatch *)
  1864.  
  1865.  
  1866. TYPE
  1867.  
  1868. (****** TextFonts node **********************************************)
  1869.  
  1870.   TextFontBase *= RECORD (e.MessageBase) END;
  1871.   TextFontBasePtr *= POINTER TO TextFontBase;
  1872.  
  1873.   TextFont * = RECORD (TextFontBase)
  1874.     message *   : e.Message;      (* reply message for font removal *)
  1875.                                   (* font name in LN        \    used in this *)
  1876.     ySize *     : e.UWORD;        (* font height            |    order to best *)
  1877.     style *     : s.SET8;         (* font style             |    match a font *)
  1878.     flags *     : s.SET8;         (* preferences and flags  /    request. *)
  1879.     xSize *     : e.UWORD;        (* nominal font width *)
  1880.     baseline *  : e.UWORD;        (* distance from the top of char to baseline *)
  1881.     boldSmear * : e.UWORD;        (* smear to affect a bold enhancement *)
  1882.  
  1883.     accessors * : e.UWORD;        (* access count *)
  1884.  
  1885.     loChar *    : CHAR;           (* the first character described here *)
  1886.     hiChar *    : CHAR;           (* the last character described here *)
  1887.     charData *  : e.APTR;         (* the bit character data *)
  1888.  
  1889.     modulo *    : e.UWORD;        (* the row modulo for the strike font data *)
  1890.     charLoc *   : e.APTR;         (* ptr to location data for the strike font *)
  1891.                                   (*   2 words: bit offset then size *)
  1892.     charSpace * : e.APTR;         (* ptr to words of proportional spacing data *)
  1893.     charKern *  : e.APTR;         (* ptr to words of kerning data *)
  1894.   END; (* TextFont *)
  1895.  
  1896.  
  1897. CONST
  1898.  
  1899. (* ----- TextFontExtension.flags0 (partial definition) ---------------------------- *)
  1900.   noRemFont *  = 0;       (* disallow RemFont for this font *)
  1901.  
  1902. TYPE
  1903.  
  1904.   TextFontExtension * = RECORD
  1905.     matchWord -     : e.UWORD;         (* a magic cookie for the extension *)
  1906.     flags0          : s.SET8;          (* (system private flags) *)
  1907.     flags1          : s.SET8;          (* (system private flags) *)
  1908.     backPtr -       : TextFontPtr;     (* validation of compilation *)
  1909.     origReplyPort - : e.MsgPortPtr;    (* original value in tfExtension *)
  1910.     tags -          : u.TagListPtr;    (* Text Tags for the font *)
  1911.     oFontPatchS     : e.APTR;          (* (system private use) *)
  1912.     oFontPatchK     : e.APTR;          (* (system private use) *)
  1913.     (* this space is reserved for future expansion *)
  1914.   END; (* TextFontExtension *)
  1915.  
  1916. CONST
  1917.  
  1918. (****** ColorTextFont node ******************************************)
  1919. (* ----- ctfFlags -------------------------------------------------- *)
  1920.   ctColorMask *    = {0..3};  (* mask to get to following color styles *)
  1921.   ctColorFont *    = 0;       (* color map contains designer's colors *)
  1922.   ctGreyFont *     = 1;       (* color map describes even-stepped *)
  1923.                               (* brightnesses from low to high *)
  1924.   ctAntiAlias *    = 2;       (* zero background thru fully saturated char *)
  1925.  
  1926.   ctMapColor *     = 0;       (* map ctfFgColor to the rpFgPen if it's *)
  1927.                               (* is a valid color within ctfLow..ctfHigh *)
  1928.  
  1929. TYPE
  1930.  
  1931. (*----- ColorFontColors --------------------------------------------*)
  1932.   ColorFontColors * = RECORD
  1933.     reserved *   : e.UWORD; (*  *must* be zero *)
  1934.     count *      : e.UWORD; (* number of entries in ColorTable *)
  1935.     colorTable * : e.APTR;  (* 4 bit per component color map packed xRGB *)
  1936.   END; (* ColorFontColors *)
  1937.  
  1938. (*----- ColorTextFont ----------------------------------------------*)
  1939.   ColorTextFont * = RECORD (TextFontBase)
  1940.     tf *          : TextFont;
  1941.     flags *       : s.SET16;  (* extended flags *)
  1942.     depth *       : SHORTINT; (* number of bit planes *)
  1943.     fgColor *     : SHORTINT; (* color that is remapped to FgPen *)
  1944.     low *         : SHORTINT; (* lowest color represented here *)
  1945.     high *        : SHORTINT; (* highest color represented here *)
  1946.     planePick *   : s.SET8;   (* PlanePick ala Images *)
  1947.     planeOnOff *  : s.SET8;   (* PlaneOnOff ala Images *)
  1948.     colorFontColors * : ColorFontColorsPtr; (* colors for font *)
  1949.     charData *    : ARRAY 8 OF e.APTR; (* pointers to bit planes ala tfCharData *)
  1950.   END; (* ColorTextFont *)
  1951.  
  1952. (****** Textextent node *********************************************)
  1953.   Textextent * = RECORD
  1954.     width *  : e.UWORD;   (* same as TextLength *)
  1955.     height * : e.UWORD;   (* same as tfYSize *)
  1956.     extent * : Rectangle; (* relative to CP *)
  1957.   END; (* Textextent *)
  1958.  
  1959.  
  1960. (*
  1961. **      $VER: videocontrol.h 39.8 (31.5.93)
  1962. **
  1963. **      definitions for videocontrol commands
  1964. *)
  1965.  
  1966.  
  1967. CONST
  1968.  
  1969.   vtagEndCM *             = 00000000H;
  1970.   vtagChromaKeyClr *      = 80000000H;
  1971.   vtagChromaKeySet *      = 80000001H;
  1972.   vtagBitPlaneKeyClr *    = 80000002H;
  1973.   vtagBitPlaneKeySet *    = 80000003H;
  1974.   vtagBorderBlankClr *    = 80000004H;
  1975.   vtagBorderBlankSet *    = 80000005H;
  1976.   vtagBorderNoTransClr *  = 80000006H;
  1977.   vtagBorderNoTransSet *  = 80000007H;
  1978.   vtagChromaPenClr *      = 80000008H;
  1979.   vtagChromaPenSet *      = 80000009H;
  1980.   vtagChromaPlaneSet *    = 8000000AH;
  1981.   vtagAttachCMSet *       = 8000000BH;
  1982.   vtagNextBufCM *         = 8000000CH;
  1983.   vtagBatchCMClr *        = 8000000DH;
  1984.   vtagBatchCMSet *        = 8000000EH;
  1985.   vtagNormalDispGet *     = 8000000FH;
  1986.   vtagNormalDispSet *     = 80000010H;
  1987.   vtagCoerceDispGet *     = 80000011H;
  1988.   vtagCoerceDispSet *     = 80000012H;
  1989.   vtagViewPortExtraGet *  = 80000013H;
  1990.   vtagViewPortExtraSet *  = 80000014H;
  1991.   vtagChromaKeyGet *      = 80000015H;
  1992.   vtagBitplaneKeyGet *    = 80000016H;
  1993.   vtagBorderBlankGet *    = 80000017H;
  1994.   vtagBorderNoTransGet *  = 80000018H;
  1995.   vtagChromaPenGet *      = 80000019H;
  1996.   vtagChromaPlaneGet *    = 8000001AH;
  1997.   vtagAttachCMGet *       = 8000001BH;
  1998.   vtagBatchCMGet *        = 8000001CH;
  1999.   vtagBatchItemsGet *     = 8000001DH;
  2000.   vtagBatchItemsSet *     = 8000001EH;
  2001.   vtagBatchItemsAdd *     = 8000001FH;
  2002.   vtagVPModeIDGet *       = 80000020H;
  2003.   vtagVPModeIDSet *       = 80000021H;
  2004.   vtagVPModeIDClr *       = 80000022H;
  2005.   vtagUserClipGet *       = 80000023H;
  2006.   vtagUserClipSet *       = 80000024H;
  2007.   vtagUserClipClr *       = 80000025H;
  2008.  
  2009. (* The following tags are V39 specific. They will be ignored (returing error -3) by
  2010.         earlier versions *)
  2011.   vtagPf1BaseGet *        = 080000026H;
  2012.   vtagPf2BaseGet *        = 080000027H;
  2013.   vtagSpEvenBaseGet *     = 080000028H;
  2014.   vtagSpOddBaseGet *      = 080000029H;
  2015.   vtagPf1BaseSet *        = 08000002AH;
  2016.   vtagPf2BaseSet *        = 08000002BH;
  2017.   vtagSpEvenBaseSet *     = 08000002CH;
  2018.   vtagSpOddBaseSet *      = 08000002DH;
  2019.   vtagBorderSpriteGet *   = 08000002EH;
  2020.   vtagBorderSpriteSet *   = 08000002FH;
  2021.   vtagBorderSpriteClr *   = 080000030H;
  2022.   vtagSpriteResnSet *     = 080000031H;
  2023.   vtagSpriteResnGet *     = 080000032H;
  2024.   vtagPf1ToSpritePriSet * = 080000033H;
  2025.   vtagPf1ToSpritePriGet * = 080000034H;
  2026.   vtagPf2ToSpritePriSet * = 080000035H;
  2027.   vtagPf2ToSpritePriGet * = 080000036H;
  2028.   vtagImmediate *         = 080000037H;
  2029.   vtagFullPaletteSet *    = 080000038H;
  2030.   vtagFullPaletteGet *    = 080000039H;
  2031.   vtagFullPaletteClr *    = 08000003AH;
  2032.   vtagDefSpriteResnSet *  = 08000003BH;
  2033.   vtagDefSpriteResnGet *  = 08000003CH;
  2034.  
  2035. (* all the following tags follow the new, rational standard for videocontrol tags:
  2036.  * VC_xxx,state         set the state of attribute 'xxx' to value 'state'
  2037.  * VC_xxx_QUERY,&var    get the state of attribute 'xxx' and store it into the longword
  2038.  *                      pointed to by &var.
  2039.  *
  2040.  * The following are new for V40:
  2041.  *)
  2042.  
  2043.   vcIntermediateCLUpdate *      = 080000080H;
  2044.         (* default=true. When set graphics will update the intermediate copper
  2045.          * lists on color changes, etc. When false, it won't, and will be faster.
  2046.          *)
  2047.   vcIntermediateCLUpdateQuery * = 080000081H;
  2048.  
  2049.   vcNoColorPaletteLoad *        = 080000082H;
  2050.         (* default = false. When set, graphics will only load color 0
  2051.          * for this ViewPort, and so the ViewPort's colors will come
  2052.          * from the previous ViewPort's.
  2053.          *
  2054.          * NB - Using this tag and VTAG_FULLPALETTE_SET together is undefined.
  2055.          *)
  2056.   vcNoColorPaletteLoadQuery *   = 080000083H;
  2057.  
  2058.   vcDualPFDisable *             = 080000084H;
  2059.         (* default = false. When this flag is set, the dual-pf bit
  2060.            in Dual-Playfield screens will be turned off. Even bitplanes
  2061.            will still come from the first BitMap and odd bitplanes
  2062.            from the second BitMap, and both R[xy]Offsets will be
  2063.            considered. This can be used (with appropriate palette
  2064.            selection) for cross-fades between differently scrolling
  2065.            images.
  2066.            When this flag is turned on, colors will be loaded for
  2067.            the viewport as if it were a single viewport of depth
  2068.            depth1+depth2 *)
  2069.   vcDualPFDisableQuery *        = 080000085H;
  2070.  
  2071.  
  2072. (*
  2073. **      $VER: graphint.h 39.0 (23.9.91)
  2074. **
  2075. **      structure used by AddTOFTask
  2076. *)
  2077.  
  2078.  
  2079. TYPE
  2080.  
  2081.   Isrvstr * = RECORD (e.NodeBase)
  2082.     node *  : e.Node;
  2083.     iptr *  : IsrvstrPtr;   (* passed to srvr by os *)
  2084.     code *  : e.PROC;
  2085.     ccode * : e.PROC;
  2086.     carg *  : LONGINT;
  2087.   END; (* Isrvstr *)
  2088.  
  2089.  
  2090. (*
  2091. **      $VER: scale.h 39.0 (21.8.91)
  2092. **
  2093. **      structure argument to BitMapScale()
  2094. *)
  2095.  
  2096.  
  2097. TYPE
  2098.  
  2099.   BitScaleArgs * = RECORD
  2100.     srcX *,        srcY *        : e.UWORD; (* source origin *)
  2101.     srcWidth *,    srcHeight *   : e.UWORD; (* source size *)
  2102.     xSrcFactor *,  ySrcFactor *  : e.UWORD; (* scale factor denominators *)
  2103.     destX *,       destY *       : e.UWORD; (* destination origin *)
  2104.     destWidth *,   destHeight *  : e.UWORD; (* destination size result *)
  2105.     xDestFactor *, yDestFactor * : e.UWORD; (* scale factor numerators *)
  2106.     srcBitMap *    : BitMapPtr;               (* source BitMap *)
  2107.     destBitMap *   : BitMapPtr;               (* destination BitMap *)
  2108.     flags *        : e.ULONG;                 (* reserved.  Must be zero! *)
  2109.     xdda *, ydda * : e.UWORD;                 (* reserved *)
  2110.     reserved1 *    : LONGINT;
  2111.     reserved2 *    : LONGINT;
  2112.   END; (* BitScaleArgs *)
  2113.  
  2114. (*
  2115. **      $VER: coerce.h 39.3 (15.2.93)
  2116. **
  2117. **      mode coercion definitions
  2118. *)
  2119.  
  2120. (* These flags are passed (in combination) to CoerceMode() to determine the
  2121.  * type of coercion required.
  2122.  *)
  2123.  
  2124. CONST
  2125.  
  2126. (* Ensure that the mode coerced to can display just as many colours as the
  2127.  * ViewPort being coerced.
  2128.  *)
  2129.   preserveColors * = 1;
  2130.  
  2131. (* Ensure that the mode coerced to is not interlaced. *)
  2132.   avoidFlicker * = 2;
  2133.  
  2134. (* Coercion should ignore monitor compatibility issues. *)
  2135.   ignoreMCompat * = 4;
  2136.  
  2137.  
  2138.   bidTagCoerce = 1;    (* Private *)
  2139.  
  2140. (*
  2141. **      $VER: rpattr.h 39.2 (31.5.93)
  2142. **
  2143. **      tag definitions for GetRPAttr, SetRPAttr
  2144. *)
  2145.  
  2146. CONST
  2147.  
  2148.   rpFont *       = 080000000H;  (* get/set font *)
  2149.   rpAPen *       = 080000002H;  (* get/set apen *)
  2150.   rpBPen *       = 080000003H;  (* get/set bpen *)
  2151.   rpDrMd *       = 080000004H;  (* get/set draw mode *)
  2152.   rpOutLinePen * = 080000005H;  (* get/set outline pen *)
  2153.   rpOutlinePen * = 080000005H;  (* get/set outline pen. corrected case. *)
  2154.   rpWriteMask *  = 080000006H;  (* get/set WriteMask *)
  2155.   rpMaxPen *     = 080000007H;  (* get/set maxpen *)
  2156.  
  2157.   rpDrawBounds * = 080000008H;  (* get only rastport draw bounds. pass &rect *)
  2158.  
  2159. (*
  2160. **      $VER: gfxbase.h 39.21 (21.4.93)
  2161. **
  2162. **      graphics base definitions
  2163. *)
  2164.  
  2165.  
  2166. TYPE
  2167.  
  2168.   GfxBasePtr * = POINTER TO GfxBase;
  2169.   GfxBase * = RECORD (e.LibraryBase)
  2170.     libNode *  : e.Library;
  2171.     actiView * : ViewPtr;
  2172.     copinit *  : CopinitPtr;           (* ptr to copper start up list *)
  2173.     cia *      : e.APTR;               (* for 8520 resource use *)
  2174.     blitter *  : e.APTR;               (* for future blitter resource use *)
  2175.     loFlist *  : e.APTR;
  2176.     shFlist *  : e.APTR;
  2177.     blthd *, blttl *     : h.BltnodePtr;
  2178.     bsblthd *, bsblttl * : h.BltnodePtr;
  2179.     vbsrv *, timsrv *, bltsrv * : e.Interrupt;
  2180.     textFonts * : e.List;
  2181.     defaultFont * : TextFontPtr;
  2182.     modes *    : s.SET16;              (* copy of current first bplcon0 *)
  2183.     vBlank *   : e.BYTE;
  2184.     debug *    : e.BYTE;
  2185.     beamSync * : INTEGER;
  2186.     systembplcon0 * : s.SET16;(* it is ored into each bplcon0 for display *)
  2187.     spriteReserved * : e.UBYTE;
  2188.     bytereserved * : e.UBYTE;
  2189.     flags * : s.SET16;
  2190.     blitLock * : INTEGER;
  2191.     blitNest * : INTEGER;
  2192.  
  2193.     blitWaitQ * : e.List;
  2194.     blitOwner * : e.TaskPtr;
  2195.     tofWaitQ *  : e.List;
  2196.     displayFlags * : s.SET16;          (* NTSC PAL GENLOC etc *)
  2197.                                        (* flags initialized at power on *)
  2198.     simpleSprites * : e.APTR;
  2199.     maxDisplayRow * : e.UWORD;          (* hardware stuff, do not use *)
  2200.     maxDisplayColumn * : e.UWORD;       (* hardware stuff, do not use *)
  2201.     normalDisplayRows * : e.UWORD;
  2202.     normalDisplayColumns * : e.UWORD;
  2203.     (* the following are for standard non interlace, 1/2 wb width *)
  2204.     normalDPMX * : e.UWORD;             (* Dots per meter on display *)
  2205.     normalDPMY * : e.UWORD;             (* Dots per meter on display *)
  2206.     lastChanceMemory * : e.SignalSemaphorePtr;
  2207.     lcMptr * : e.APTR;
  2208.     microsPerLine * : e.UWORD;          (* 256 time usec/line *)
  2209.     minDisplayColumn * : e.UWORD;
  2210.     chipRevBits0 * : s.SET8;
  2211.     memType * :  e.UBYTE;
  2212.     reserved * : ARRAY 4 OF e.UBYTE;
  2213.     monitorid * : e.UWORD;             (* normally null *)
  2214.     hedley * : ARRAY 8 OF e.ULONG;
  2215.     hedleySprites * : ARRAY 8 OF e.ULONG;     (* sprite ptrs for intuition mouse *)
  2216.     hedleySprites1 * : ARRAY 8 OF e.ULONG;            (* sprite ptrs for intuition mouse *)
  2217.     hedleyCount * : INTEGER;
  2218.     hedleyFlags * : s.SET16;
  2219.     hedleyTmp * : INTEGER;
  2220.     hashTable * : e.APTR;
  2221.     currentTotRows * : e.UWORD;
  2222.     currentTotCclks * : e.UWORD;
  2223.     hedleyHint * : e.UBYTE;
  2224.     hedleyHint2 * : e.UBYTE;
  2225.     nreserved * : ARRAY 4 OF e.ULONG;
  2226.     a2024SyncRaster * : e.APTR;
  2227.     controlDeltaPAL * : INTEGER;
  2228.     controlDeltaNTSC * : INTEGER;
  2229.     currentMonitor * : MonitorSpecPtr;
  2230.     monitorList * : e.List;
  2231.     defaultMonitor * : MonitorSpecPtr;
  2232.     monitorListSemaphore * : e.SignalSemaphorePtr;
  2233.     displayInfoDataBase * : e.APTR;
  2234.     topLine * : INTEGER;
  2235.     actiViewCprSemaphore * : e.SignalSemaphorePtr;
  2236.     utilBase * : e.LibraryPtr;           (* for hook and tag utilities   *)
  2237.     execBase * : e.LibraryPtr;              (* to link with rom.lib *)
  2238.     bwshifts * :  e.APTR;
  2239.     strtFetchMasks * :  e.APTR;
  2240.     stopFetchMasks * :  e.APTR;
  2241.     overrun * :  e.APTR;
  2242.     realStops * :  e.APTR;
  2243.     spriteWidth * :  e.UWORD;   (* current width (in words) of sprites *)
  2244.     spriteFMode * :  e.UWORD;           (* current sprite fmode bits    *)
  2245.     softSprites * :  e.BYTE;  (* bit mask of size change knowledgeable sprites *)
  2246.     arraywidth * :  e.BYTE;
  2247.     defaultSpriteWidth * :  e.UWORD;    (* what width intuition wants *)
  2248.     sprMoveDisable * :  e.BYTE;
  2249.     wantChips * :  e.UBYTE;
  2250.     boardMemType * :  e.UBYTE;
  2251.     bugs * :  e.UBYTE;
  2252.     layersBase * :  e.APTR;
  2253.     colorMask * :  e.ULONG;
  2254.     iVector * :  e.APTR;
  2255.     iData * :  e.APTR;
  2256.     specialCounter * :  e.ULONG;        (* special for double buffering *)
  2257.     dBList * :  e.APTR;
  2258.     monitorFlags * :  s.SET16;
  2259.     scanDoubledSprites * :  e.UBYTE;
  2260.     bP3Bits * :  e.UBYTE;
  2261.     monitorVBlank * :  AnalogSignalInterval;
  2262.     monitor * :  MonitorSpecPtr;
  2263.     progData * :  e.APTR;
  2264.     extSprites * :  e.UBYTE;
  2265.     pad3 * :  e.UBYTE;
  2266.     gfxFlags * :  s.SET16;
  2267.     vBCounter * :  e.ULONG;
  2268.     hashTableSemaphore * :  e.SignalSemaphorePtr;
  2269.     hwEmul * :  POINTER TO ARRAY 9 OF e.APTR;
  2270.   END; (* GfxBase *)
  2271.  
  2272. CONST
  2273.  
  2274. (* Values for gfxBase.displayFlags *)
  2275.   ntsc *            = 1;
  2276.   genloc *          = 2;
  2277.   pal *             = 4;
  2278.   todaSafe *        = 8;
  2279.   reallyPal *       = 16;  (* what is actual crystal frequency
  2280.                               (as opposed to what bootmenu set the agnus to)?
  2281.                               (V39) *)
  2282.   lpenSwapFrames *  = 32;
  2283.                            (* LightPen software could set this bit if the
  2284.                             * "lpen-with-interlace" fix put in for V39
  2285.                             * does not work. This is true of a number of
  2286.                             * Agnus chips.
  2287.                             * (V40).
  2288.                             *)
  2289.  
  2290.   blitMsgFault *   = 4;
  2291.  
  2292. (* bits defs for ChipRevBits *)
  2293.   bigBlits *  = 0;
  2294.   hrAgnus *   = 0;
  2295.   hrDenise *  = 1;
  2296.   aaAlice *   = 2;
  2297.   aaLisa *    = 3;
  2298.   aaMLisa     = 4;  (* internal use only. *)
  2299.  
  2300. (* Pass ONE of these to SetChipRev() *)
  2301.   chipRevA *    = {hrAgnus};
  2302.   chipRevECS *  = {hrAgnus, hrDenise};
  2303.   chipRevAA *   = {aaAlice, aaLisa} + chipRevECS;
  2304.   chipRevBest * = {0..31};
  2305.  
  2306. (* memory type *)
  2307.   bus16 *          = 0;
  2308.   nmlCAS *         = 0;
  2309.   bus32 *          = 1;
  2310.   dblCAS *         = 2;
  2311.   bandwidth1x *    = {bus16, nmlCAS};
  2312.   bandwidth2xNml * = {bus32};
  2313.   bandwidth2xDbl * = {dblCAS};
  2314.   bandwidth4x *    = {bus32, dblCAS};
  2315.  
  2316. (* GfxFlags (private) *)
  2317.   newDatabase = 1;
  2318.  
  2319.   graphicsName * = "graphics.library";
  2320.  
  2321. (**-- Library Base variable --------------------------------------------*)
  2322.  
  2323.  
  2324. VAR
  2325.  
  2326.   gfx *, base * : GfxBasePtr;
  2327.  
  2328.  
  2329. (**-- Library Functions ------------------------------------------------*)
  2330.  
  2331. (*
  2332. **      $VER: graphics_protos.h 39.31 (29.4.93)
  2333. *)
  2334.  
  2335. (* ------ BitMap primitives ------*)
  2336.  
  2337. PROCEDURE BltBitMap* [base,-30]
  2338.   ( srcBitMap  [8] : BitMapPtr;
  2339.     xSrc       [0] : INTEGER;
  2340.     ySrc       [1] : INTEGER;
  2341.     destBitMap [9] : BitMapPtr;
  2342.     xDest      [2] : INTEGER;
  2343.     yDest      [3] : INTEGER;
  2344.     xSize      [4] : INTEGER;
  2345.     ySize      [5] : INTEGER;
  2346.     minterm    [6] : e.UBYTE;
  2347.     mask       [7] : s.SET8;
  2348.     tempA     [10] : PLANEPTR )
  2349.   : e.ULONG;
  2350.  
  2351. PROCEDURE BltTemplate* [base,-36]
  2352.   ( source [8] : PLANEPTR;
  2353.     xSrc   [0] : INTEGER;
  2354.     srcMod [1] : INTEGER;
  2355.     destRP [9] : RastPortPtr;
  2356.     xDest  [2] : INTEGER;
  2357.     yDest  [3] : INTEGER;
  2358.     xSize  [4] : INTEGER;
  2359.     ySize  [5] : INTEGER );
  2360.  
  2361. (* ------ Text routines ------*)
  2362.  
  2363. PROCEDURE ClearEOL* [base,-42]
  2364.   ( rp [9] : RastPortPtr );
  2365. PROCEDURE ClearScreen* [base,-48]
  2366.   ( rp [9] : RastPortPtr );
  2367. PROCEDURE TextLength* [base,-54]
  2368.   ( rp [9] : RastPortPtr;
  2369.     string [8] : ARRAY OF CHAR;
  2370.     count  [0] : LONGINT )
  2371.   : INTEGER;
  2372. PROCEDURE Text* [base,-60]
  2373.   ( rp     [9] : RastPortPtr;
  2374.     string [8] : ARRAY OF CHAR;
  2375.     count  [0] : LONGINT );
  2376. PROCEDURE SetFont* [base,-66]
  2377.   ( rp       [9] : RastPortPtr;
  2378.     textFont [8] : TextFontBasePtr );
  2379. PROCEDURE OpenFont* [base,-72]
  2380.   ( VAR textAttr [8] : TextAttr )
  2381.   : TextFontPtr;
  2382. PROCEDURE CloseFont* [base,-78]
  2383.   ( textFont [9] : TextFontBasePtr );
  2384. PROCEDURE AskSoftStyle* [base,-84]
  2385.   ( rp [9] : RastPortPtr )
  2386.   : s.SET8;
  2387. PROCEDURE SetSoftStyle* [base,-90]
  2388.   ( rp     [9] : RastPortPtr;
  2389.     style  [0] : s.SET8;
  2390.     enable [1] : s.SET8 )
  2391.   : s.SET8;
  2392.  
  2393. (* ------ Gels routines ------*)
  2394.  
  2395. PROCEDURE AddBob* [base,-96]
  2396.   ( bob [8] : BobPtr;
  2397.     rp  [9] : RastPortPtr );
  2398. PROCEDURE AddVSprite* [base,-102]
  2399.   ( vSprite [8] : VSpritePtr;
  2400.     rp      [9] : RastPortPtr );
  2401. PROCEDURE DoCollision* [base,-108]
  2402.   ( rp [9] : RastPortPtr );
  2403. PROCEDURE DrawGList* [base,-114]
  2404.   ( rp [9] : RastPortPtr;
  2405.     vp [8] : ViewPortPtr );
  2406. PROCEDURE InitGels* [base,-120]
  2407.   ( head      [8] : VSpritePtr;
  2408.     tail      [9] : VSpritePtr;
  2409.     gelsInfo [10] : GelsInfoPtr );
  2410. PROCEDURE InitMasks* [base,-126]
  2411.   ( vSprite [0] : VSpritePtr );
  2412. PROCEDURE RemIBob* [base,-132]
  2413.   ( bob [8] : BobPtr;
  2414.     rp  [9] : RastPortPtr;
  2415.     vp [10] : ViewPortPtr );
  2416. PROCEDURE RemVSprite* [base,-138]
  2417.   ( vSprite [8] : VSpritePtr );
  2418. PROCEDURE SetCollision* [base,-144]
  2419.   ( num      [0] : e.ULONG;
  2420.     routine  [8] : e.PROC;
  2421.     gelsInfo [9] : GelsInfoPtr );
  2422. PROCEDURE SortGList* [base,-150]
  2423.   ( rp [9] : RastPortPtr );
  2424. PROCEDURE AddAnimOb* [base,-156]
  2425.   ( anOb      [8] : AnimObPtr;
  2426.     VAR anKey [9] : AnimObPtr;
  2427.     rp       [10] : RastPortPtr );
  2428. PROCEDURE Animate* [base,-162]
  2429.   ( VAR anKey [8] : AnimObPtr;
  2430.     rp        [9] : RastPortPtr );
  2431. PROCEDURE GetGBuffers* [base,-168]
  2432.   ( anOb [8] : AnimObPtr;
  2433.     rp   [9] : RastPortPtr;
  2434.     flag [0] : BOOLEAN )
  2435.   : BOOLEAN;
  2436. PROCEDURE InitGMasks* [base,-174]
  2437.   ( anOb [8] : AnimObPtr );
  2438.  
  2439. (* ------        General graphics routines ------*)
  2440.  
  2441. PROCEDURE DrawEllipse* [base,-180]
  2442.   ( rp      [9] : RastPortPtr;
  2443.     xCenter [0] : INTEGER;
  2444.     yCenter [1] : INTEGER;
  2445.     a       [2] : INTEGER;
  2446.     b       [3] : INTEGER );
  2447. PROCEDURE AreaEllipse* [base,-186]
  2448.   ( rp      [9] : RastPortPtr;
  2449.     xCenter [0] : INTEGER;
  2450.     yCenter [1] : INTEGER;
  2451.     a       [2] : INTEGER;
  2452.     b       [3] : INTEGER )
  2453.   : BOOLEAN;
  2454. PROCEDURE LoadRGB4* [base,-192]
  2455.   ( vp     [8] : ViewPortPtr;
  2456.     colors [1] : ARRAY OF e.UWORD;
  2457.     count  [0] : LONGINT );
  2458. PROCEDURE InitRastPort* [base,-198]
  2459.   ( VAR rp [9] : RastPort );
  2460. PROCEDURE InitVPort* [base,-204]
  2461.   ( VAR vp [8] : ViewPort );
  2462. PROCEDURE OldMrgCop* [base,-210]
  2463.   ( view [9] : ViewPtr );
  2464. PROCEDURE MrgCop* [base,-210]
  2465.   ( view [9] : ViewPtr )
  2466.   : LONGINT;
  2467. PROCEDURE MakeVPort* [base,-216]
  2468.   ( view [8] : ViewPtr;
  2469.     vp   [9] : ViewPortPtr );
  2470. PROCEDURE LoadView* [base,-222]
  2471.   ( view [9] : ViewPtr );
  2472. PROCEDURE WaitBlit* [base,-228] ();
  2473. PROCEDURE SetRast* [base,-234]
  2474.   ( rp  [9] : RastPortPtr;
  2475.     pen [0] : e.UBYTE );
  2476. PROCEDURE Move* [base,-240]
  2477.   ( rp [9] : RastPortPtr;
  2478.     x  [0] : INTEGER;
  2479.     y  [1] : INTEGER );
  2480. PROCEDURE Draw* [base,-246]
  2481.   ( rp [9] : RastPortPtr;
  2482.     x  [0] : INTEGER;
  2483.     y  [1] : INTEGER );
  2484. PROCEDURE AreaMove* [base,-252]
  2485.   ( rp [9] : RastPortPtr;
  2486.     x  [0] : INTEGER;
  2487.     y  [1] : INTEGER )
  2488.   : BOOLEAN;
  2489. PROCEDURE AreaDraw* [base,-258]
  2490.   ( rp [9] : RastPortPtr;
  2491.     x  [0] : INTEGER;
  2492.     y  [1] : INTEGER )
  2493.   : BOOLEAN;
  2494. PROCEDURE AreaEnd* [base,-264]
  2495.   ( rp [9] : RastPortPtr )
  2496.   : BOOLEAN;
  2497. PROCEDURE WaitTOF* [base,-270] ();
  2498. PROCEDURE QBlit* [base,-276]
  2499.   ( blit [9] : h.BltnodePtr );
  2500. PROCEDURE InitArea* [base,-282]
  2501.   ( VAR areaInfo [8] : AreaInfo;
  2502.     vectorBuffer [9] : e.APTR;
  2503.     maxVectors   [0] : LONGINT );
  2504. PROCEDURE SetRGB4* [base,-288]
  2505.   ( vp    [8] : ViewPortPtr;
  2506.     index [0] : LONGINT;
  2507.     red   [1] : e.UBYTE;
  2508.     green [2] : e.UBYTE;
  2509.     blue  [3] : e.UBYTE );
  2510. PROCEDURE QBSBlit* [base,-294]
  2511.   ( blit [9] : h.BltnodePtr );
  2512. PROCEDURE BltClear* [base,-300]
  2513.   ( memBlock  [9] : PLANEPTR;
  2514.     byteCount [0] : e.ULONG;
  2515.     flags     [1] : s.SET32 );
  2516. PROCEDURE RectFill* [base,-306]
  2517.   ( rp   [9] : RastPortPtr;
  2518.     xMin [0] : INTEGER;
  2519.     yMin [1] : INTEGER;
  2520.     xMax [2] : INTEGER;
  2521.     yMax [3] : INTEGER );
  2522. PROCEDURE BltPattern* [base,-312]
  2523.   ( rp      [9] : RastPortPtr;
  2524.     mask    [8] : PLANEPTR;
  2525.     xMin    [0] : INTEGER;
  2526.     yMin    [1] : INTEGER;
  2527.     xMax    [2] : INTEGER;
  2528.     yMax    [3] : INTEGER;
  2529.     maskBPR [4] : INTEGER );
  2530. PROCEDURE ReadPixel* [base,-318]
  2531.   ( rp [9] : RastPortPtr;
  2532.     x  [0] : INTEGER;
  2533.     y  [1] : INTEGER )
  2534.   : LONGINT;
  2535. PROCEDURE WritePixel* [base,-324]
  2536.   ( rp [9] : RastPortPtr;
  2537.     x  [0] : INTEGER;
  2538.     y  [1] : INTEGER )
  2539.   : BOOLEAN;
  2540. PROCEDURE Flood* [base,-330]
  2541.   ( rp   [9] : RastPortPtr;
  2542.     mode [2] : e.ULONG;
  2543.     x    [0] : INTEGER;
  2544.     y    [1] : INTEGER )
  2545.   : BOOLEAN;
  2546. PROCEDURE PolyDraw* [base,-336]
  2547.   ( rp        [9] : RastPortPtr;
  2548.     count     [0] : INTEGER;
  2549.     polyTable [8] : ARRAY OF Point );
  2550. PROCEDURE PolyDrawList* [base,-336]
  2551.   ( rp        [9]   : RastPortPtr;
  2552.     count     [0]   : INTEGER;
  2553.     polyTable [8].. : INTEGER );
  2554. PROCEDURE SetAPen* [base,-342]
  2555.   ( rp  [9] : RastPortPtr;
  2556.     pen [0] : e.UBYTE );
  2557. PROCEDURE SetBPen* [base,-348]
  2558.   ( rp  [9] : RastPortPtr;
  2559.     pen [0] : e.UBYTE );
  2560. PROCEDURE SetDrMd* [base,-354]
  2561.   ( rp       [9] : RastPortPtr;
  2562.     drawMode [0] : s.SET8 );
  2563. PROCEDURE InitView* [base,-360]
  2564.   ( VAR view [9] : View );
  2565. PROCEDURE CBump* [base,-366]
  2566.   ( copList [9] : UCopListPtr );
  2567. PROCEDURE CMove* [base,-372]
  2568.   ( copList     [9] : UCopListPtr;
  2569.     destination [0] : e.APTR;
  2570.     data        [1] : e.UWORD );
  2571. PROCEDURE CWait* [base,-378]
  2572.   ( copList [9] : UCopListPtr;
  2573.     v       [0] : INTEGER;
  2574.     h       [1] : INTEGER );
  2575. PROCEDURE VBeamPos* [base,-384] ()
  2576.   : LONGINT;
  2577. PROCEDURE InitBitMap* [base,-390]
  2578.   ( VAR bitMap [8] : BitMap;
  2579.     depth      [0] : SHORTINT;
  2580.     width      [1] : INTEGER;
  2581.     height     [2] : INTEGER );
  2582. PROCEDURE ScrollRaster* [base,-396]
  2583.   ( rp   [9] : RastPortPtr;
  2584.     dx   [0] : INTEGER;
  2585.     dy   [1] : INTEGER;
  2586.     xMin [2] : INTEGER;
  2587.     yMin [3] : INTEGER;
  2588.     xMax [4] : INTEGER;
  2589.     yMax [5] : INTEGER );
  2590. PROCEDURE WaitBOVP* [base,-402]
  2591.   ( vp [8] : ViewPortPtr );
  2592. PROCEDURE GetSprite* [base,-408]
  2593.   ( VAR sprite [8] : SimpleSpriteBase;
  2594.     num        [0] : INTEGER )
  2595.   : INTEGER;
  2596. PROCEDURE FreeSprite* [base,-414]
  2597.   ( num [0] : INTEGER );
  2598. PROCEDURE ChangeSprite* [base,-420]
  2599.   ( vp         [8] : ViewPortPtr;
  2600.     VAR sprite [9] : SimpleSpriteBase;
  2601.     newData   [10] : PLANEPTR );
  2602. PROCEDURE MoveSprite* [base,-426]
  2603.   ( vp         [8] : ViewPortPtr;
  2604.     VAR sprite [9] : SimpleSpriteBase;
  2605.     x          [0] : INTEGER;
  2606.     y          [1] : INTEGER );
  2607. PROCEDURE LockLayerRom* [base,-432]
  2608.   ( layer [13] : LayerPtr );
  2609. PROCEDURE UnlockLayerRom* [base,-438]
  2610.   ( layer [13] : LayerPtr );
  2611. PROCEDURE SyncSBitMap* [base,-444]
  2612.   ( layer [8] : LayerPtr );
  2613. PROCEDURE CopySBitMap* [base,-450]
  2614.   ( layer [8] : LayerPtr );
  2615. PROCEDURE OwnBlitter* [base,-456] ();
  2616. PROCEDURE DisownBlitter* [base,-462] ();
  2617. PROCEDURE InitTmpRas* [base,-468]
  2618.   ( VAR tmpRas [8] : TmpRas;
  2619.     buffer     [9] : PLANEPTR;
  2620.     size       [0] : e.ULONG );
  2621. PROCEDURE AskFont* [base,-474]
  2622.   ( rp           [9] : RastPortPtr;
  2623.     VAR textAttr [8] : TextAttr );
  2624. PROCEDURE AddFont* [base,-480]
  2625.   ( textFont [9] : TextFontBasePtr );
  2626. PROCEDURE RemFont* [base,-486]
  2627.   ( textFont [9] : TextFontBasePtr );
  2628. PROCEDURE AllocRaster* [base,-492]
  2629.   ( width  [0] : e.UWORD;
  2630.     height [1] : e.UWORD )
  2631.   : PLANEPTR;
  2632. PROCEDURE FreeRaster* [base,-498]
  2633.   ( p      [8] : PLANEPTR;
  2634.     width  [0] : e.UWORD;
  2635.     height [1] : e.UWORD );
  2636. PROCEDURE AndRectRegion* [base,-504]
  2637.   ( region        [8] : RegionPtr;
  2638.     VAR rectangle [9] : RectangleBase );
  2639. PROCEDURE OrRectRegion* [base,-510]
  2640.   ( region        [8] : RegionPtr;
  2641.     VAR rectangle [9] : RectangleBase )
  2642.   : BOOLEAN;
  2643. PROCEDURE NewRegion* [base,-516] ()
  2644.   : RegionPtr;
  2645. PROCEDURE ClearRectRegion* [base,-522]
  2646.   ( region        [8] : RegionPtr;
  2647.     VAR rectangle [9] : RectangleBase )
  2648.   : BOOLEAN;
  2649. PROCEDURE ClearRegion* [base,-528]
  2650.   ( region [8] : RegionPtr );
  2651. PROCEDURE DisposeRegion* [base,-534]
  2652.   ( region [8] : RegionPtr );
  2653. PROCEDURE FreeVPortCopLists* [base,-540]
  2654.   ( vp [8] : ViewPortPtr );
  2655. PROCEDURE FreeCopList* [base,-546]
  2656.   ( copList [8] : CopListDummyPtr );
  2657. PROCEDURE ClipBlit* [base,-552] (
  2658.   srcRP   [8] : RastPortPtr;
  2659.   xSrc    [0] : INTEGER;
  2660.   ySrc    [1] : INTEGER;
  2661.   destRP  [9] : RastPortPtr;
  2662.   xDest   [2] : INTEGER;
  2663.   yDest   [3] : INTEGER;
  2664.   xSize   [4] : INTEGER;
  2665.   ySize   [5] : INTEGER;
  2666.   minterm [6] : e.UBYTE );
  2667. PROCEDURE XorRectRegion* [base,-558]
  2668.   ( region        [8] : RegionPtr;
  2669.     VAR rectangle [9] : RectangleBase )
  2670.   : BOOLEAN;
  2671. PROCEDURE FreeCprList* [base,-564]
  2672.   ( cprList [8] : CprlistPtr );
  2673. PROCEDURE GetColorMap* [base,-570]
  2674.   ( entries [0] : LONGINT )
  2675.   : ColorMapPtr;
  2676. PROCEDURE FreeColorMap* [base,-576]
  2677.   ( colorMap [8] : ColorMapPtr );
  2678. PROCEDURE GetRGB4* [base,-582]
  2679.   ( colorMap [8] : ColorMapPtr;
  2680.     entry    [0] : LONGINT )
  2681.   : INTEGER;
  2682. PROCEDURE ScrollVPort* [base,-588]
  2683.   ( vp [8] : ViewPortPtr );
  2684. PROCEDURE UCopperListInit* [base,-594]
  2685.   ( uCopList [8] : UCopListPtr;
  2686.     n        [0] : LONGINT )
  2687.   : CopListDummyPtr;
  2688. PROCEDURE FreeGBuffers* [base,-600]
  2689.   ( anOb [8] : AnimObPtr;
  2690.     rp   [9] : RastPortPtr;
  2691.     flag [0] : BOOLEAN );
  2692. PROCEDURE BltBitMapRastPort* [base,-606]
  2693.   ( srcBitMap [8] : BitMapPtr;
  2694.     xSrc      [0] : INTEGER;
  2695.     ySrc      [1] : INTEGER;
  2696.     destRP    [9] : RastPortPtr;
  2697.     xDest     [2] : INTEGER;
  2698.     yDest     [3] : INTEGER;
  2699.     xSize     [4] : INTEGER;
  2700.     ySize     [5] : INTEGER;
  2701.     minterm   [6] : e.UBYTE )
  2702.   : BOOLEAN;
  2703. PROCEDURE OrRegionRegion* [base,-612]
  2704.   ( srcRegion  [8] : RegionPtr;
  2705.     destRegion [9] : RegionPtr )
  2706.   : BOOLEAN;
  2707. PROCEDURE XorRegionRegion* [base,-618]
  2708.   ( srcRegion  [8] : RegionPtr;
  2709.     destRegion [9] : RegionPtr )
  2710.   : BOOLEAN;
  2711. PROCEDURE AndRegionRegion* [base,-624]
  2712.   ( srcRegion  [8] : RegionPtr;
  2713.     destRegion [9] : RegionPtr )
  2714.   : BOOLEAN;
  2715. PROCEDURE SetRGB4CM* [base,-630] (
  2716.   colorMap [8] : ColorMapPtr;
  2717.   index    [0] : INTEGER;
  2718.   red      [1] : e.UBYTE;
  2719.   green    [2] : e.UBYTE;
  2720.   blue     [3] : e.UBYTE );
  2721. PROCEDURE BltMaskBitMapRastPort* [base,-636] (
  2722.   srcBitMap [8] : BitMapPtr;
  2723.   xSrc      [0] : INTEGER;
  2724.   ySrc      [1] : INTEGER;
  2725.   destRP    [9] : RastPortPtr;
  2726.   xDest     [2] : INTEGER;
  2727.   yDest     [3] : INTEGER;
  2728.   xSize     [4] : INTEGER;
  2729.   ySize     [5] : INTEGER;
  2730.   minterm   [6] : e.UBYTE;
  2731.   bltMask  [10] : PLANEPTR );
  2732. PROCEDURE AttemptLockLayerRom* [base,-654]
  2733.   ( layer [13] : LayerPtr )
  2734.   : BOOLEAN;
  2735.  
  2736. (* --- functions in V36 or higher (distributed as Release 2.0) ---*)
  2737.  
  2738. PROCEDURE GfxNew* [base,-660]
  2739.   ( gfxNodeType [0] : e.ULONG )
  2740.   : ExtendedNodeBasePtr;
  2741. PROCEDURE GfxFree* [base,-666]
  2742.   ( gfxNodePtr [8] : ExtendedNodeBasePtr );
  2743. PROCEDURE GfxAssociate* [base,-672]
  2744.   ( associateNode [8] : ExtendedNodeBasePtr;
  2745.     gfxNodePtr    [9] : ExtendedNodeBasePtr );
  2746. PROCEDURE BitMapScale* [base,-678]
  2747.   ( bitScaleArgs [8] : BitScaleArgsPtr );
  2748. PROCEDURE ScalerDiv* [base,-684]
  2749.   ( factor      [0] : e.ULONG;
  2750.     numerator   [1] : e.ULONG;
  2751.     denominator [2] : e.ULONG )
  2752.   : e.UWORD;
  2753. PROCEDURE TextExtent* [base,-690]
  2754.   ( rp              [9] : RastPortPtr;
  2755.     string          [8] : ARRAY OF CHAR;
  2756.     count           [0] : LONGINT;
  2757.     VAR textExtent [10] : Textextent )
  2758.   : INTEGER;
  2759. PROCEDURE TextFit* [base,-696]
  2760.   ( rp                    [9] : RastPortPtr;
  2761.     string                [8] : ARRAY OF CHAR;
  2762.     strLen                [0] : e.ULONG;
  2763.     textExtent           [10] : TextextentPtr;
  2764.     constrainingExtent   [11] : TextextentPtr;
  2765.     strDirection          [1] : LONGINT;
  2766.     constrainingBitWidth  [2] : e.ULONG;
  2767.     constrainingBitHeight [3] : e.ULONG )
  2768.   : e.ULONG;
  2769. PROCEDURE GfxLookUp* [base,-702]
  2770.   ( associateNode [8] : ExtendedNodeBasePtr )
  2771.   : e.APTR;
  2772. PROCEDURE VideoControlA* [base,-708]
  2773.   ( colorMap [8] : ColorMapPtr;
  2774.     tagarray [9] : ARRAY OF u.TagItem )
  2775.   : BOOLEAN;
  2776. PROCEDURE VideoControl* [base,-708]
  2777.   ( colorMap [8]   : ColorMapPtr;
  2778.     tagarray [9].. : u.Tag )
  2779.   : BOOLEAN;
  2780. PROCEDURE OpenMonitor* [base,-714]
  2781.   ( monitorName [9] : ARRAY OF CHAR;
  2782.     displayID   [0] : e.ULONG )
  2783.   : MonitorSpecPtr;
  2784. PROCEDURE CloseMonitor* [base,-720]
  2785.   ( monitorSpec [8] : MonitorSpecPtr )
  2786.   : BOOLEAN;
  2787. PROCEDURE FindDisplayInfo* [base,-726]
  2788.   ( displayID [0] : e.ULONG )
  2789.   : DisplayInfoHandle;
  2790. PROCEDURE NextDisplayInfo* [base,-732]
  2791.   ( displayID [0] : e.ULONG )
  2792.   : e.ULONG;
  2793. PROCEDURE AddDisplayInfo* [base,-738];
  2794. PROCEDURE AddDisplayInfoData* [base,-744];
  2795. PROCEDURE SetDisplayInfoData* [base,-750]
  2796.   ( handle    [8] : DisplayInfoHandle;
  2797.     buf       [9] : ARRAY OF SYS.BYTE;
  2798.     size      [0] : e.ULONG;
  2799.     tagID     [1] : e.ULONG;
  2800.     displayID [2] : e.ULONG)
  2801.   : e.ULONG;
  2802. PROCEDURE GetDisplayInfoData* [base,-756]
  2803.   ( handle    [8] : DisplayInfoHandle;
  2804.     VAR buf   [9] : ARRAY OF SYS.BYTE;
  2805.     size      [0] : e.ULONG;
  2806.     tagID     [1] : e.ULONG;
  2807.     displayID [2] : e.ULONG )
  2808.   : e.ULONG;
  2809. PROCEDURE FontExtent* [base,-762]
  2810.   ( font           [8] : TextFontBasePtr;
  2811.     VAR fontExtent [9] : Textextent );
  2812. PROCEDURE ReadPixelLine8* [base,-768]
  2813.   ( rp         [8] : RastPortPtr;
  2814.     xstart     [0] : e.UWORD;
  2815.     ystart     [1] : e.UWORD;
  2816.     width      [2] : e.ULONG;
  2817.     VAR array [10] : ARRAY OF SYS.BYTE;
  2818.     tempRP     [9] : RastPortPtr )
  2819.   : LONGINT;
  2820. PROCEDURE WritePixelLine8* [base,-774]
  2821.   ( rp     [8] : RastPortPtr;
  2822.     xstart [0] : e.UWORD;
  2823.     ystart [1] : e.UWORD;
  2824.     width  [2] : e.ULONG;
  2825.     array [10] : ARRAY OF SYS.BYTE;
  2826.     tempRP [9] : RastPortPtr )
  2827.   : LONGINT;
  2828. PROCEDURE ReadPixelArray8* [base,-780]
  2829.   ( rp         [8] : RastPortPtr;
  2830.     xstart     [0] : e.UWORD;
  2831.     ystart     [1] : e.UWORD;
  2832.     xstop      [2] : e.UWORD;
  2833.     ystop      [3] : e.UWORD;
  2834.     VAR array [10] : ARRAY OF SYS.BYTE;
  2835.     temprp     [9] : RastPortPtr )
  2836.   : LONGINT;
  2837. PROCEDURE WritePixelArray8* [base,-786]
  2838.   ( rp         [8] : RastPortPtr;
  2839.     xstart     [0] : e.UWORD;
  2840.     ystart     [1] : e.UWORD;
  2841.     xstop      [2] : e.UWORD;
  2842.     ystop      [3] : e.UWORD;
  2843.     VAR array [10] : ARRAY OF SYS.BYTE;
  2844.     temprp     [9] : RastPortPtr )
  2845.   : LONGINT;
  2846. PROCEDURE GetVPModeID* [base,-792]
  2847.   ( vp [8] : ViewPortPtr )
  2848.   : LONGINT;
  2849. PROCEDURE ModeNotAvailable* [base,-798]
  2850.   ( modeID [0] : e.ULONG )
  2851.   : LONGINT;
  2852. PROCEDURE WeighTAMatchA* [base,-804]
  2853.   ( VAR reqTextAttr    [8] : TextAttr;
  2854.     VAR targetTextAttr [9] : TextAttr;
  2855.     targetTags        [10] : ARRAY OF u.TagItem )
  2856.   : INTEGER;
  2857. PROCEDURE WeighTAMatch* [base,-804]
  2858.   ( VAR reqTextAttr    [8]   : TextAttr;
  2859.     VAR targetTextAttr [9]   : TextAttr;
  2860.     targetTags        [10].. : u.Tag )
  2861.   : INTEGER;
  2862. PROCEDURE EraseRect* [base,-810]
  2863.   ( rp   [9] : RastPortPtr;
  2864.     xMin [0] : INTEGER;
  2865.     yMin [1] : INTEGER;
  2866.     xMax [2] : INTEGER;
  2867.     yMax [3] : INTEGER );
  2868. PROCEDURE ExtendFontA* [base,-816]
  2869.   ( font     [8] : TextFontBasePtr;
  2870.     fontTags [9] : ARRAY OF u.TagItem )
  2871.   : e.ULONG;
  2872. PROCEDURE ExtendFont* [base,-816]
  2873.   ( font     [8]   : TextFontBasePtr;
  2874.     fontTags [9].. : u.Tag )
  2875.   : e.ULONG;
  2876. PROCEDURE StripFont* [base,-822]
  2877.   ( font [8] : TextFontBasePtr );
  2878.  
  2879. (*--- functions in V39 or higher (Release 3) ---*)
  2880.  
  2881. PROCEDURE CalcIVG* [base,-828]
  2882.   ( v  [8] : ViewPtr;
  2883.     vp [9] : ViewPortPtr )
  2884.   : e.UWORD;
  2885. PROCEDURE AttachPalExtra* [base,-834]
  2886.   ( cm [8] : ColorMapPtr;
  2887.     vp [9] : ViewPortPtr )
  2888.   : LONGINT;
  2889. PROCEDURE ObtainBestPenA* [base,-840]
  2890.   ( cm   [8] : ColorMapPtr;
  2891.     r    [1] : e.ULONG;
  2892.     g    [2] : e.ULONG;
  2893.     b    [3] : e.ULONG;
  2894.     tags [9] : ARRAY OF u.TagItem )
  2895.   : LONGINT;
  2896. PROCEDURE ObtainBestPen* [base,-840]
  2897.   ( cm   [8]  : ColorMapPtr;
  2898.     r    [1]  : e.ULONG;
  2899.     g    [2]  : e.ULONG;
  2900.     b    [3]  : e.ULONG;
  2901.     tags [9]..: u.Tag )
  2902.   : LONGINT;
  2903. PROCEDURE SetRGB32* [base,-852]
  2904.   ( vp [8] : ViewPortPtr;
  2905.     n  [0] : e.ULONG;
  2906.     r  [1] : e.ULONG;
  2907.     g  [2] : e.ULONG;
  2908.     b  [3] : e.ULONG );
  2909. PROCEDURE GetAPen* [base,-858]
  2910.   ( rp [8] : RastPortPtr )
  2911.   : e.ULONG;
  2912. PROCEDURE GetBPen* [base,-864]
  2913.   ( rp [8] : RastPortPtr )
  2914.   : e.ULONG;
  2915. PROCEDURE GetDrMd* [base,-870]
  2916.   ( rp [8] : RastPortPtr )
  2917.   : s.SET32;
  2918. PROCEDURE GetOutlinePen* [base,-876]
  2919.   ( rp [8] : RastPortPtr )
  2920.   : e.ULONG;
  2921. PROCEDURE LoadRGB32* [base,-882]
  2922.   ( vp        [8] : ViewPortPtr;
  2923.     VAR table [9] : ARRAY OF e.ULONG );
  2924. PROCEDURE SetChipRev* [base,-888]
  2925.   ( want [0] : s.SET32 )
  2926.   : s.SET32;
  2927. PROCEDURE SetABPenDrMd* [base,-894]
  2928.   ( rp [9]       : RastPortPtr;
  2929.     apen [0]     : e.ULONG;
  2930.     bpen [1]     : e.ULONG;
  2931.     drawmode [2] : s.SET8 );
  2932. PROCEDURE GetRGB32* [base,-900]
  2933.   ( cm         [8] : ColorMapPtr;
  2934.     firstcolor [0] : e.ULONG;
  2935.     ncolors    [1] : e.ULONG;
  2936.     VAR table  [9] : ARRAY OF e.ULONG );
  2937. PROCEDURE AllocBitMap* [base,-918]
  2938.   ( sizex [0]        : e.ULONG;
  2939.     sizey [1]        : e.ULONG;
  2940.     depth [2]        : e.ULONG;
  2941.     flags [3]        : s.SET32;
  2942.     friendBitmap [8] : BitMapPtr )
  2943.   : BitMapPtr;
  2944. PROCEDURE FreeBitMap* [base,-924]
  2945.   ( bm [8] : BitMapPtr );
  2946. PROCEDURE GetExtSpriteA* [base,-930]
  2947.   ( ss  [10] : ExtSpritePtr;
  2948.     tags [9] : ARRAY OF u.TagItem )
  2949.   : LONGINT;
  2950. PROCEDURE GetExtSprite* [base,-930]
  2951.   ( ss  [10]  : ExtSpritePtr;
  2952.     tags [9]..: u.Tag )
  2953.   : LONGINT;
  2954. PROCEDURE CoerceMode* [base,-936]
  2955.   ( vp        [8] : ViewPortPtr;
  2956.     monitorid [0] : e.ULONG;
  2957.     flags     [1] : e.ULONG )
  2958.   : e.ULONG;
  2959. PROCEDURE ChangeVPBitMap* [base,-942]
  2960.   ( vp [8]  : ViewPortPtr;
  2961.     bm [9]  : BitMapPtr;
  2962.     db [10] : DBufInfoPtr );
  2963. PROCEDURE ReleasePen* [base,-948]
  2964.   ( cm [8] : ColorMapPtr;
  2965.     n  [0] : e.ULONG );
  2966. PROCEDURE ObtainPen* [base,-954]
  2967.   ( cm [8] : ColorMapPtr;
  2968.     n  [0] : e.ULONG;
  2969.     r  [1] : e.ULONG;
  2970.     g  [2] : e.ULONG;
  2971.     b  [3] : e.ULONG;
  2972.     f  [4] : LONGINT )
  2973.   : e.ULONG;
  2974. PROCEDURE GetBitMapAttr* [base,-960]
  2975.   ( bm      [8] : BitMapPtr;
  2976.     attrnum [1] : e.ULONG )
  2977.   : e.ULONG;
  2978. PROCEDURE AllocDBufInfo* [base,-966]
  2979.   ( vp [8] : ViewPortPtr )
  2980.   : DBufInfoPtr;
  2981. PROCEDURE FreeDBufInfo* [base,-972]
  2982.   ( dbi [9] : DBufInfoPtr );
  2983. PROCEDURE SetOutlinePen* [base,-978]
  2984.   ( rp  [8] : RastPortPtr;
  2985.     pen [0] : e.ULONG )
  2986.   : e.ULONG;
  2987. PROCEDURE SetWriteMask* [base,-984]
  2988.   ( rp  [8] : RastPortPtr;
  2989.     msk [0] : s.SET32 )
  2990.   : BOOLEAN;
  2991. PROCEDURE SetMaxPen* [base,-990]
  2992.   ( rp     [8] : RastPortPtr;
  2993.     maxpen [0] : e.ULONG );
  2994. PROCEDURE SetRGB32CM* [base,-996]
  2995.   ( cm [8] : ColorMapPtr;
  2996.     n  [0] : e.ULONG;
  2997.     r  [1] : e.ULONG;
  2998.     g  [2] : e.ULONG;
  2999.     b  [3] : e.ULONG );
  3000. PROCEDURE ScrollRasterBF* [base,-1002]
  3001.   ( rp   [9] : RastPortPtr;
  3002.     dx   [0] : LONGINT;
  3003.     dy   [1] : LONGINT;
  3004.     xMin [2] : LONGINT;
  3005.     yMin [3] : LONGINT;
  3006.     xMax [4] : LONGINT;
  3007.     yMax [5] : LONGINT );
  3008. PROCEDURE FindColor* [base,-1008]
  3009.   ( cm      [11] : ColorMapPtr;
  3010.     r        [1] : e.ULONG;
  3011.     g        [2] : e.ULONG;
  3012.     b        [3] : e.ULONG;
  3013.     maxcolor [4] : LONGINT )
  3014.   : LONGINT;
  3015. PROCEDURE AllocSpriteDataA* [base,-1020]
  3016.   ( bm  [10] : BitMapPtr;
  3017.     tags [9] : ARRAY OF u.TagItem )
  3018.   : ExtSpritePtr;
  3019. PROCEDURE AllocSpriteData* [base,-1020]
  3020.   ( bm  [10]  : BitMapPtr;
  3021.     tags [9]..: u.Tag )
  3022.   : ExtSpritePtr;
  3023. PROCEDURE ChangeExtSpriteA* [base,-1026]
  3024.   ( vp         [8] : ViewPortPtr;
  3025.     oldsprite  [9] : ExtSpritePtr;
  3026.     newsprite [10] : ExtSpritePtr;
  3027.     tags      [11] : ARRAY OF u.TagItem )
  3028.   : LONGINT;
  3029. PROCEDURE ChangeExtSprite* [base,-1026]
  3030.   ( vp         [8]  : ViewPortPtr;
  3031.     oldsprite  [9]  : ExtSpritePtr;
  3032.     newsprite [10]  : ExtSpritePtr;
  3033.     tags      [11]..: u.Tag )
  3034.   : LONGINT;
  3035. PROCEDURE FreeSpriteData* [base,-1032]
  3036.   ( sp [10] : ExtSpritePtr );
  3037. PROCEDURE SetRPAttrsA* [base,-1038]
  3038.   ( rp   [8] : RastPortPtr;
  3039.     tags [9] : ARRAY OF u.TagItem );
  3040. PROCEDURE SetRPAttrs* [base,-1038]
  3041.   ( rp   [8]  : RastPortPtr;
  3042.     tags [9]..: u.Tag );
  3043. PROCEDURE GetRPAttrsA* [base,-1044]
  3044.   ( rp   [8] : RastPortPtr;
  3045.     tags [9] : ARRAY OF u.TagItem );
  3046. PROCEDURE GetRPAttrs* [base,-1044]
  3047.   ( rp   [8]  : RastPortPtr;
  3048.     tags [9]..: u.Tag );
  3049. PROCEDURE BestModeIDA* [base,-1050]
  3050.   ( tags [8] : ARRAY OF u.TagItem )
  3051.   : e.ULONG;
  3052. PROCEDURE BestModeID* [base,-1050]
  3053.   ( tags [8]..: u.Tag )
  3054.   : e.ULONG;
  3055.  
  3056. (*--- functions in V40 or higher (Release 3.1) ---*)
  3057.  
  3058. PROCEDURE WriteChunkyPixels* [base,-1056]
  3059.   ( rp          [8] : RastPortPtr;
  3060.     xstart      [0] : e.ULONG;
  3061.     ystart      [1] : e.ULONG;
  3062.     xstop       [2] : e.ULONG;
  3063.     ystop       [3] : e.ULONG;
  3064.     array      [10] : ARRAY OF SYS.BYTE;
  3065.     bytesperrow [4] : LONGINT );
  3066.  
  3067. (**-- C Macros defined as procedures -----------------------------------*)
  3068.  
  3069. <*$LongVars+*>
  3070.  
  3071. (*
  3072. **      $VER: gfxmacros.h 39.3 (31.5.93)
  3073. *)
  3074.  
  3075. (**-----------------------------------*)
  3076. (* This macro is obsolete as of V39. AllocBitMap() should be used for allocating
  3077.    bitmap data, since it knows about the machine's particular alignment
  3078.    restrictions.
  3079. *)
  3080. PROCEDURE [0] RASSIZE* (w, h : INTEGER) : LONGINT;
  3081.  
  3082. BEGIN (* RASSIZE *)
  3083.   RETURN ( h * (((LONG (w) + 15) DIV 16) * 2))
  3084. END RASSIZE;
  3085.  
  3086. (**-----------------------------------*)
  3087. PROCEDURE [0] InitAnimate * (VAR anKey: AnimObPtr);
  3088. BEGIN
  3089.   anKey := NIL;
  3090. END InitAnimate;
  3091.  
  3092. (**-----------------------------------*)
  3093. PROCEDURE [0] RemBob * (b: BobPtr);
  3094. BEGIN
  3095.   INCL(b.flags,bobsAway);
  3096. END RemBob;
  3097.  
  3098. (**-----------------------------------*)
  3099. PROCEDURE [0] OnDisplay* ();
  3100.  
  3101. BEGIN (* OnDisplay *)
  3102.   h.custom.dmacon := {h.dmaSet, h.raster}
  3103. END OnDisplay;
  3104.  
  3105. (**-----------------------------------*)
  3106. PROCEDURE [0] OffDisplay* ();
  3107.  
  3108. BEGIN (* OffDisplay *)
  3109.   h.custom.dmacon := {h.raster}
  3110. END OffDisplay;
  3111.  
  3112. (**-----------------------------------*)
  3113. PROCEDURE [0] OnSprite* ();
  3114.  
  3115. BEGIN (* OnSprite *)
  3116.   h.custom.dmacon := {h.dmaSet, h.sprite}
  3117. END OnSprite;
  3118.  
  3119. (**-----------------------------------*)
  3120. PROCEDURE [0] OffSprite* ();
  3121.  
  3122. BEGIN (* OffSprite *)
  3123.   h.custom.dmacon := {h.sprite}
  3124. END OffSprite;
  3125.  
  3126. (**-----------------------------------*)
  3127. PROCEDURE [0] OnVBlank* ();
  3128.  
  3129. BEGIN (* OnVBlank *)
  3130.   h.custom.intena := {h.dmaSet, h.vertb}
  3131. END OnVBlank;
  3132.  
  3133. (**-----------------------------------*)
  3134. PROCEDURE [0] OffVBlank* ();
  3135.  
  3136. BEGIN (* OffVBlank *)
  3137.   h.custom.intena := {h.vertb}
  3138. END OffVBlank;
  3139.  
  3140.  
  3141. (**-----------------------------------*)
  3142. PROCEDURE [0] SetDrPt* (w : RastPortPtr; p : e.UWORD);
  3143.  
  3144. BEGIN (* SetDrPt *)
  3145.   w.linePtrn := p; INCL (w.flags, frstDot); w.linpatcnt := 15
  3146. END SetDrPt;
  3147.  
  3148. (**-----------------------------------*)
  3149. PROCEDURE [0] SetAfPt* (w : RastPortPtr; p : e.APTR; n : SHORTINT);
  3150.  
  3151. BEGIN (* SetAfPt *)
  3152.   w.areaPtrn := p; w.areaPtSz := n
  3153. END SetAfPt;
  3154.  
  3155. (**-----------------------------------*)
  3156. PROCEDURE [0] SetOPen* (w : RastPortPtr; c : SHORTINT);
  3157.  
  3158. BEGIN (* SetOPen *)
  3159.   w.aOlPen := c; INCL (w.flags, areaOutline)
  3160. END SetOPen;
  3161.  
  3162. (**-----------------------------------*)
  3163. PROCEDURE [0] SetWrMsk* (w : RastPortPtr; m : s.SET8);
  3164.  
  3165. BEGIN (* SetWrMsk *)
  3166.   w.mask := m
  3167. END SetWrMsk;
  3168.  
  3169. (* the SafeSetxxx macros are backwards (pre V39 graphics) compatible versions *)
  3170. (* using these macros will make your code do the right thing under V39 AND V37 *)
  3171. (**-----------------------------------*)
  3172. PROCEDURE [0] SafeSetOutlinePen* (w : RastPortPtr; c : SHORTINT);
  3173.   VAR ignore : LONGINT;
  3174. BEGIN (* SafeSetOutlinePen *)
  3175.   IF base.libNode.version < 39 THEN
  3176.     w.aOlPen := c; INCL (w.flags, areaOutline)
  3177.   ELSE
  3178.     ignore := SetOutlinePen (w, c)
  3179.   END
  3180. END SafeSetOutlinePen;
  3181.  
  3182. (**-----------------------------------*)
  3183. PROCEDURE [0] SafeSetWriteMask* (w : RastPortPtr; m : s.SET8);
  3184.   VAR ignore : BOOLEAN;
  3185. BEGIN (* SafeSetWriteMask *)
  3186.   IF base.libNode.version < 39 THEN
  3187.     w.mask := m
  3188.   ELSE
  3189.     ignore := SetWriteMask (w, LONG (LONG (m)))
  3190.   END
  3191. END SafeSetWriteMask;
  3192.  
  3193. (**-----------------------------------*)
  3194. PROCEDURE [0] BndryOff* (w : RastPortPtr);
  3195.  
  3196. BEGIN (* BndryOff *)
  3197.   EXCL (w.flags, areaOutline)
  3198. END BndryOff;
  3199.  
  3200. (**-----------------------------------*)
  3201. PROCEDURE [0] CINIT* (c : UCopListPtr; n : LONGINT);
  3202.  
  3203. BEGIN (* CINIT *)
  3204.   SYS.PUTREG (0, UCopperListInit (c, n))
  3205. END CINIT;
  3206.  
  3207. (**-----------------------------------*)
  3208. PROCEDURE [0] CMOVE*
  3209.   (c : UCopListPtr; a : e.APTR; b : e.UWORD );
  3210.  
  3211. BEGIN (* CMOVE *)
  3212.   CMove (c, a, b); CBump (c)
  3213. END CMOVE;
  3214.  
  3215. (**-----------------------------------*)
  3216. PROCEDURE [0] CWAIT* (c : UCopListPtr; a : INTEGER; b : INTEGER );
  3217.  
  3218. BEGIN (* CWAIT *)
  3219.   CWait (c, a, b); CBump (c)
  3220. END CWAIT;
  3221.  
  3222. (**-----------------------------------*)
  3223. PROCEDURE [0] CEND* (c : UCopListPtr);
  3224.  
  3225. BEGIN (* CEND *)
  3226.  CWAIT (c, 10000, 255)
  3227. END CEND;
  3228.  
  3229.  
  3230. (**-----------------------------------*)
  3231. PROCEDURE [0] DrawCircle* (rp : RastPortPtr; cx, cy, r : INTEGER);
  3232.  
  3233. BEGIN (* DrawCircle *)
  3234.   DrawEllipse (rp, cx, cy, r, r)
  3235. END DrawCircle;
  3236.  
  3237.  
  3238. (**-----------------------------------*)
  3239. PROCEDURE [0] AreaCircle* (rp : RastPortPtr; cx, cy, r : INTEGER)
  3240.   : BOOLEAN;
  3241.  
  3242. BEGIN (* AreaCircle *)
  3243.   RETURN AreaEllipse (rp, cx, cy, r, r)
  3244. END AreaCircle;
  3245.  
  3246.  
  3247. (**-- Library Base Variable --------------------------------------------*)
  3248.  
  3249. <*$LongVars-*>
  3250.  
  3251. PROCEDURE* [0] Close (VAR rc : LONGINT);
  3252.  
  3253. BEGIN (* Close *)
  3254.   IF base # NIL THEN e.CloseLibrary (base) END;
  3255. END Close;
  3256.  
  3257. BEGIN (* Graphics *)
  3258.   base := SYS.VAL (GfxBasePtr,
  3259.                    e.OpenLibrary (graphicsName, e.libraryMinimum));
  3260.   IF base = NIL THEN HALT (100) END;
  3261.   gfx := base;
  3262.   Kernel.SetCleanup (Close)
  3263. END Graphics.
  3264.